Can TreeGrid automatically check child nodes when parent node is selected?
At present, after selecting the parent node, we find that only the parent node is selected .I use grid.select () to select the child nodes manually, but this requires traversing the elements in the grid, which will become very time-consuming in the case of large amount of data
Can TreeGrid automatically check child nodes when parent node is selected?
No, there is no such feature yet in the TreeGrid.
I use grid.select () to select the child nodes manually, but this requires traversing the elements
Do you mean really manually or traversing the tree programmatically?
which will become very time-consuming in the case of large amount of data
It can be so, depending on the case, especially if you have dataprovider with callbacks and slow queries.
If this feature would be added in the TreeGrid, the implementation would be essentially the same. So the potential performance problems would be still there. These are well known.
https://github.com/vaadin/vaadin-grid/issues/1914#issuecomment-683806711
As there are some inherent challenges in hierarchical data I have proposed to introduce eager mode to TreeGrid. So depending on the setting it would fetch the entire subtree at once or be truly lazy. The both modes have pros and cons. Either the TreeGrid is time consuming and less memory consuming, or it is faster and more memory consuming. There is no free lunch here.