carbon
carbon copied to clipboard
feat(treeview): add experimental controllable API
Ref #14451 / Point 1
This PR introduces an experimental controllable API for the TreeView to address point 1 mentioned in above linked discussion.
A user must opt-in via the feature flag enable-treeview-controllable
.
Changelog
New
- feature flag
enable-treeview-controllable
- TreeView
props.onActivate
to pass-through node'sonToggle
events - TreeNode
props.defaultIsExpanded
for uncontrolled mode
Changed
- With above mentioned feature flag, the states
selected
andactive
can be controlled or uncontrolled based on the user's choice
Testing / Reviewing
- Storybook
- Test suites
@tay1orjones I wanted to implement the feature flag approach you shared a while back for this change. Is there any naming guidance for these yet? I avoided v12
directly and essentially followed this structure:
enable-[component]-[feature]
Let me know what you think!
Deploy Preview for v11-carbon-react ready!
Built without sensitive environment variables
Name | Link |
---|---|
Latest commit | 74c9709167e47018b80a42130dbb556b3e1fdad7 |
Latest deploy log | https://app.netlify.com/sites/v11-carbon-react/deploys/65d309c8c1b4d00008ad2336 |
Deploy Preview | https://deploy-preview-15397--v11-carbon-react.netlify.app |
Preview on mobile | Toggle QR Code...Use your smartphone camera to open QR code link. |
To edit notification comments on pull requests, go to your Netlify site configuration.
@tay1orjones @emyarod Let me know if you have any questions around this!
This LGTM! @emyarod do you have a chance to give this a review before we merge?