You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Changing isExpanded props in TreeNode to false doesn't change TreeNode inner state
What package(s) are you using?
carbon-components
carbon-components-react
Detailed description
As TreeView and TreeNode aren't officially released yet I've copied the source code directly to our app.
The problem is with the isExpanded prop. In my scenario, I need the button to collapse all nodes at once. To do so I am using isExpanded prop of the TreeNode component.
Information about the expanded or collapsed node is stored in redux. So when collapse all button is clicked I'm setting isExpanded prop to false. Unfortunately, it doesn't collapse the nodes. Prop changes to the false but the inner state doesn't (see the gif below).
The text was updated successfully, but these errors were encountered:
What package(s) are you using?
carbon-components
carbon-components-react
Detailed description
As TreeView and TreeNode aren't officially released yet I've copied the source code directly to our app.
The problem is with the
isExpanded
prop. In my scenario, I need the button to collapse all nodes at once. To do so I am usingisExpanded
prop of the TreeNode component.Information about the expanded or collapsed node is stored in redux. So when collapse all button is clicked I'm setting
isExpanded
prop to false. Unfortunately, it doesn't collapse the nodes. Prop changes to the false but the inner state doesn't (see the gif below).The text was updated successfully, but these errors were encountered: