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

TreeList SelectAll doesn't select collapsed node's children (not even first level of children) #1281

Closed
genachka opened this issue Sep 8, 2017 · 6 comments

Comments

@genachka
Copy link

genachka commented Sep 8, 2017

Using 17.1.6, I have 10 rows. 3 of the rows have 1 level of 3 children under them. When I click on SelectAll, if those parent rows a collapsed, the children are never shown as selected via the checkbox. I would expect the behavior to selected the children whether the parent row is expanded or not. You can see this behavior also here, have everything collapsed, tick on select all and expand John Heart: https://js.devexpress.com/Demos/WidgetsGallery/Demo/TreeList/MultipleRowSelection/jQuery/Light/

Also, if I select the parent row, whether the row is expanded or not has no affect, the children are never automatically selected. I would expect selecting the parent row should automatically select the children whether the parent is expanded or not. Further, I would expect the checkbox on the parent to be the same functionality or three state so that if I unselect a child it should change to indicate that like the SelectAll checkbox visual state.

@genachka genachka changed the title TreeList SelectAll doesn't selected collapsed node's children TreeList SelectAll doesn't select collapsed node's children (not even first level of children) Sep 11, 2017
@genachka
Copy link
Author

To clarify, i'm not looking for recursive functionality here, though I would expect that a select all (the checkbox on the header of the TreeList as well as of course the API for it) would take every level of children in to account otherwise it's not a select all.

Since I saw you don't support recursive by selecting a parent node (not sure why you don't support this already?) I did implement my own on the onSelectionChanged event. And even though I'm not using e.component.getVisibleRows() but rather e.component.getNodeByKey(key) if the parent is collapsed, it doesn't select the children. Meaning, when I expand the parent in the TreeList, the children are shown as unchecked. If the parent is expanded and I do the recursive selection it works.

@genachka
Copy link
Author

Any news here on this issue?
I've had make a hack to prevent collapsing and to force an expand of all, hide the collapse via CSS and trap clicking on collapse. Of course I would like to be able to allow the user to decide whether to expand collapse rows but because of this bug it's unreliable to select all when collapsed.

@NikitaKunashov
Copy link

Hello,
Currently, our TreeList selectAll method selects only visible nodes. We considered possible ways to implement this feature and decided that this approach is most appropriate since it makes the behavior consistent in the cases when a remote and a local data source are used. Selecting invisible nodes requires loading the whole data source, which can be large, so it can affect the performance.
So, the only reliable way to select all nodes without the necessity to load all data locally is using the recursive selection that is implemented in the upcoming 17.2 release. You can currently check this functionality in our preview build.
Let us know if you need any assistance in finding a reliable workaround for the current version.

@genachka
Copy link
Author

genachka commented Oct 2, 2017

@NikitaKunashov I understand what your saying but that's misleading to an end user. Other tree / treegrid controls I've worked with even with remote data, they select all the retrieved items in case where remote data is used. Imagine a user is trying to export data and finds that they Select All only took a small % of the items.

But what's worse is that as a developer, I've not been able to reliably do a recursive Select All which sounds like it's been resolved in 17.2 in which case that may solve my brute force approach but I still think there should be a native option to support that expected behavior.

@GoshaFighten
Copy link

@genachka I understand you and the required functionality will be available in version 17.2. For version 17.1, use the approach illustrated in the dxTreeList - How to implement recursive selection example to achieve this.

@genachka
Copy link
Author

genachka commented Dec 26, 2017

@GoshaFighten Thanks for the added functionality in 17.2. Now using it and it's working great!!

iBat pushed a commit to iBat/DevExtreme that referenced this issue Aug 21, 2023
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
iBat pushed a commit to iBat/DevExtreme that referenced this issue Feb 8, 2024
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

3 participants