As @Eskibear mentioned in #116141 (comment) the checkboxstate of TreeItem2 does not work correctly when set to the value 0. It parses it incorrectly and sets it to "No checkbox" instead of "unchecked checkbox". When it's set to the value 1 it creates the checkbox and checks it.
However, when the checkbox is set in the following way, the checkbox works like intended:
checkboxState: { state: condition ? 1 : 0}
I had a quick look at the code and I believe the problem lies here: https://github.com/microsoft/vscode/blob/main/src/vs/workbench/api/common/extHostTreeViews.ts#L767
It seems like it should be checking for undefined as the value 0 will also trigger it to return undefined otherwise
As @Eskibear mentioned in #116141 (comment) the checkboxstate of TreeItem2 does not work correctly when set to the value 0. It parses it incorrectly and sets it to "No checkbox" instead of "unchecked checkbox". When it's set to the value 1 it creates the checkbox and checks it.
However, when the checkbox is set in the following way, the checkbox works like intended:
checkboxState: { state: condition ? 1 : 0}I had a quick look at the code and I believe the problem lies here: https://github.com/microsoft/vscode/blob/main/src/vs/workbench/api/common/extHostTreeViews.ts#L767
It seems like it should be checking for undefined as the value 0 will also trigger it to return undefined otherwise