[ic-tree-item]: Emit the expanded state of the tree item.
Summary
It would be useful to have the expanded state of the ic-tree-item emitted so a particular action and be performed if the tree item is open or not.
๐ฌ Description
It looks like the expanded state of an tree item is already available, however, it is not being exposed via the IcTreeSelected event or in it's own event handler.
๐ฐ Use value
It would be good to expose this to users so that they can perform an action based on the tree item's expanded state.
๐ Acceptance Criteria
If relevant, describe in full detail the different interactions and edge cases that the component or patterns needs to fulfil.
Given that the tree view component is initially loaded
When a tree item is clicked
Then an event will be emitted which includes the expanded state of the tree item
Given that a tree item is expanded
When the user clicks on the tree item
Then the tree item should emit isExpanded: false as the tree item has just collapsed
Given that a tree item is closed
When the user click on the tree item
Then the tree item should emit isExpanded: true as the tree item has just been expanded
โ Designs
N/A
##โฏ๐งพ Guidance N/A
Additional info
Tell us anything else useful to help us understand your suggestion.
Can I try to fix this?
@evenstensberg, please do if you have time to!
We agreed to make the expanded prop mutable and introduce an event