-
Notifications
You must be signed in to change notification settings - Fork 156
Checkbox and search support #13
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
Comments
Hi @mooijtech thanks for the question. I think you can accomplish what you want by using the tree.selectById(id, true) method, and the state.isSelected parts of the NodeRenderer's state. The tree instance is passed to the node renderer so you can use like so. function NodeRenderer({data, state, tree}) {
return (
...
<input type="checkbox" checked={state.isSelected} onClick={() => tree.selectById(data.id, true)} />
...
} When I have more time, I'll put up an example of checkboxes on the demo site. |
Hi James, Finally got around to implementing this. React wants to use the I ended up fixing the shift-clicking by calling the <input
id="row"
name="row"
type="checkbox"
checked={state.isSelected}
onClick={handlers.select}
onChange={() => {}}
/> I also needed to listen for the selection change, can we expose an |
I think defaultChecked will work for you case. And this seems like an okay workaround. I'm working on a version 2 that will clean this up. |
Using Edit: Actually it's still broken, my |
I think I've found the root cause of the |
Closed as this is solved by react-arborist v2: #49 (comment) |
@mooijtech can you please share the code for the demo you added for using checkboxes? |
Hello,
I would like to replace react-dropdown-tree-select with this library.
Would it be possible to add functionality where you can checkbox folders and search for folders?
The text was updated successfully, but these errors were encountered: