Radzen Tree checkboxes giving incorrect CheckedValues #701

Closed
opened 2026-01-29 17:41:48 +00:00 by claunia · 2 comments
Owner

Originally created by @ArjR on GitHub (Jan 18, 2023).

Describe the bug
Selecting a parent item doesn't put children into CheckedValues collection. Unless the children have already been expanded at least once.

To Reproduce
Steps to reproduce the behavior:

  1. Go to https://blazor.radzen.com/tree-checkboxes?theme=standard
  2. Click root parent node "Beverages"
  3. See incorrect single value on console: "CheckedValues Changed Beverages"
  4. Expand out Beverages to show all the children are actually selected as well
  5. Collapse the children again
  6. Untick and then reclick root parent node "Beverages"
  7. Now correct values on console: "CheckedValues Changed Beverages Chai Chang Guaraná Fantástica Sasquatch Ale Steeleye Stout Côte de Blaye Chartreuse verte Ipoh Coffee Laughing Lumberjack Lager Outback Lager Rhönbräu Klosterbier Lakkalikööri"

Expected behavior
Should not need to expand out each node in order for correct CheckedValues to show.

Screenshots
image
image
image

Desktop (please complete the following information):

  • OS: Windows 10
  • Browser Chrome
  • Version 109.0.5414.75 (Official Build) (64-bit)

Additional context
There is a similar issue with parent not being removed from the CheckValues as well:
image
image

Originally created by @ArjR on GitHub (Jan 18, 2023). **Describe the bug** Selecting a parent item doesn't put children into CheckedValues collection. Unless the children have already been expanded at least once. **To Reproduce** Steps to reproduce the behavior: 1. Go to https://blazor.radzen.com/tree-checkboxes?theme=standard 2. Click root parent node "Beverages" 3. See incorrect **single value** on console: "CheckedValues Changed Beverages" 4. Expand out Beverages to show all the children are actually selected as well 5. Collapse the children again 6. Untick and then reclick root parent node "Beverages" 7. Now correct values on console: "CheckedValues Changed Beverages Chai Chang Guaraná Fantástica Sasquatch Ale Steeleye Stout Côte de Blaye Chartreuse verte Ipoh Coffee Laughing Lumberjack Lager Outback Lager Rhönbräu Klosterbier Lakkalikööri" **Expected behavior** Should not need to expand out each node in order for correct CheckedValues to show. **Screenshots** ![image](https://user-images.githubusercontent.com/12074426/213188613-fc644318-936d-4d71-bcf9-ee05d8ea0f2b.png) ![image](https://user-images.githubusercontent.com/12074426/213188686-e7a05070-dcdf-44d0-9d3f-c0ba55e15978.png) ![image](https://user-images.githubusercontent.com/12074426/213188765-5a32d1fc-3717-4590-ac1d-bf164f215b6f.png) **Desktop (please complete the following information):** - OS: Windows 10 - Browser Chrome - Version 109.0.5414.75 (Official Build) (64-bit) **Additional context** There is a similar issue with parent not being removed from the CheckValues as well: ![image](https://user-images.githubusercontent.com/12074426/213189262-49cefb26-9921-4553-8a44-67ff0d85f726.png) ![image](https://user-images.githubusercontent.com/12074426/213189809-1ad97c4d-f64a-49e5-b709-96e8fada9080.png)
Author
Owner

@enchev commented on GitHub (Jan 18, 2023):

This is how the component works - child nodes are unknown when the parent is checked since they are now yet loaded. If we need to check all child nodes on parent node check we might end with serious performance problems since to check the child nodes we must load them and they might be millions.

@enchev commented on GitHub (Jan 18, 2023): This is how the component works - child nodes are unknown when the parent is checked since they are now yet loaded. If we need to check all child nodes on parent node check we might end with serious performance problems since to check the child nodes we must load them and they might be millions.
Author
Owner

@ArjR commented on GitHub (Jan 18, 2023):

Understood regarding large data sets. However if the data is preloaded already (.ToList) from a small Category set, then is there any working around for this?

The only work around I can see is setting all expanded to begin with. But then there is no programmable way to collapse all to make it look presentable?

Lastly, in the last 2 screenshots, Condiments and Aniseed Syrup are both CheckValues, even though Condiment isn't actually checked.

@ArjR commented on GitHub (Jan 18, 2023): Understood regarding large data sets. However if the data is preloaded already (.ToList) from a small Category set, then is there any working around for this? The only work around I can see is setting all expanded to begin with. But then there is no programmable way to collapse all to make it look presentable? Lastly, in the last 2 screenshots, **Condiments** and **Aniseed Syrup** are both CheckValues, even though **Condiment** isn't actually checked.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/radzen-blazor#701