Comments (7)
Great question.
The onCheckToggleCb
callback function will only get the list of nodes that got toggled.
The onUpdateCb
callback will get the full data.
You can determine the parent of checked/unchecked node by finding it in the full tree.
from react-super-treeview.
So the correct one would implement on the onUpdateCb
callback, I was trying on the onCheckToggleCb
callback ...
I'll try later with onUpdateCb
and report here
Thank you
from react-super-treeview.
from react-super-treeview.
Hi @azizali , how's it going?
Sorry for the delay, I was able to do this through a combination of 'onCheckToggleCb' and 'onUpdateCb'
I got the last selected node in 'onCheckToggleCb' and found the parent by reference in 'onUpdateCb' and checked this
Thanks for the help, and sorry my bad english
from react-super-treeview.
from react-super-treeview.
Hi @azizali , how's it going?
Sorry for the delay, I was able to do this through a combination of 'onCheckToggleCb' and 'onUpdateCb'
I got the last selected node in 'onCheckToggleCb' and found the parent by reference in 'onUpdateCb' and checked this
Thanks for the help, and sorry my bad english
I would interest in how you implement your solution, specially how to manage to pass the reference of the box that was checked, to the onUpdateCb. Thanks in advance
from react-super-treeview.
I strongly recommend using react-checkbox-tree if you need this functionality (which is a must for a tree-view component). I hardly managed to check the upper parents but even in that case component doesn't half-check the parent and couldn't make it do that since it's not created considering this functionality.
from react-super-treeview.
Related Issues (20)
- Node.js version issues. HOT 9
- Allow a different label from name
- Question
- Question: How can I show a popup when shiftClicked ? HOT 2
- How to change icons HOT 3
- Highlight node row when a node is hovered over.
- Can't change values for attributes "id" in <input> tag and for "for" in <label> tag
- Horizontal scrollbar
- when we selects child, parents icon should change
- How can i customize icons here
- Please let me know how I can load data asynchronously. Any code sample will be highly appreciated. While loading I want to show loading....
- loadData method called twice
- Have Only one node (chekbox) selected at a time
- how to run this on development?
- Keyevent on checkbox selection
- Adding a node
- incompatible module
- Rendering hangs when there are React elements in node name
- Label title uses the node text which renders [Object object] when using a React component to render the name
- This library is not compatible with latest versions of node and reactjs
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-super-treeview.