Skip to content
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

Checkbox: Treating selection differently than focus #267

Open
ronnyek opened this issue Aug 20, 2024 · 0 comments
Open

Checkbox: Treating selection differently than focus #267

ronnyek opened this issue Aug 20, 2024 · 0 comments

Comments

@ronnyek
Copy link

ronnyek commented Aug 20, 2024

So I've looked I found this post, and with the documents for v2, I was able to get this to work some of the way...
#13

I'd like to have the checkboxes control selection, and not so much just clicking text in a tree node. I'm not sure if this is something that is possible... but so far I've done something like this in the node renderer...

 <Checkbox checked={node.isSelected} onChange={()=>{
                node.selectMulti(node.data.id, !node.isSelected);
            }}/>

Right now, it still seems like the checkboxes only appear on the the rows focused. Is there a way to treat focus and selection separately? I'd prefer not to require users to have to click with modifier keys and would rather just have mutli-selection with checkboxs by clicking checkbox.

Is this as simple as somehow overriding node click somehow to set focus, but not selection? I tried playing with the selectionFollowsFocus but honestly could not even tell what that was doing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant