Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

lukasnys
Copy link
Collaborator

@lukasnys lukasnys commented Mar 27, 2025

Context

We have a use case where we want to be able to select a parent row without its children rows getting selected.

This MR adds a selectingParentSelectsChildren argument to the ember-tbody component which defaults to true. When setting this argument to false, selecting a parent node won't select the node's children.

An assertion has been added to disallow setting selectingParentSelectsChildren to false while selectingChildrenSelectsParent is true since this would result in weird edge cases where sometimes the parent row has influence on the children and sometimes not.

Some examples of use cases on the web where this also happens: MUI tree view, react-checkbox-tree No Cascade Example.

How to test?

Take a look at the Prism MR: https://git.otainsight.com/ota-insight-repos/ota-insight-platform/ota-insight-frontend/prism/-/merge_requests/1029

@lukasnys
Copy link
Collaborator Author

lukasnys commented Apr 2, 2025

Closing as design changed their mind about this behaviour

@lukasnys lukasnys closed this Apr 2, 2025
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

Successfully merging this pull request may close these issues.

1 participant