-
Notifications
You must be signed in to change notification settings - Fork 28.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Test tree checkbox API #183549
Comments
Feels really nice! Excited for finalization so I can adopt it completely 😄 |
There's no API to set the checked state programmatically, correct? |
@aeschli I was using a tree data provider by setting the checked state on the TreeItem, then firing the did change event. This allowed me to programmatically set an item as checked/unchecked. |
I think this should be closed, reopen if I'm wrong |
Using a tree data provider and setting the checked state on the TreeItem, then firing the on did change event is the way to set the checked state programmatically. |
Refs: #116141
Complexity: 5
Roles: Developer, Engineering Manager
Create Issue
Tree items support an optional checkbox with this API proposal:
vscode/src/vscode-dts/vscode.proposed.treeItemCheckbox.d.ts
Lines 8 to 15 in 0524ecc
To verify, you'll need to use this checkbox property in a tree view. If you don't have an extension that could benefit from having checkboxes, you can use the tree view sample and add the checkbox property here:
https://github.com/microsoft/vscode-extension-samples/blob/f7b27a91779e770b8f8f0e6791bcefc5d9c64035/tree-view-sample/src/testView.ts#L77-L81
And listen for the checkbox change event on this tree view:
https://github.com/microsoft/vscode-extension-samples/blob/f7b27a91779e770b8f8f0e6791bcefc5d9c64035/tree-view-sample/src/testView.ts#L6-L7
Things to verify:
onDidChangeCheckboxState
.manuallyManageCheckboxSelection
option (vscode/src/vscode-dts/vscode.proposed.treeItemCheckbox.d.ts
Lines 51 to 56 in 0524ecc
The text was updated successfully, but these errors were encountered: