-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: Treenode does not pick up passed through props active
or selected
#17378
Comments
Hi @AustinGitHub!
Ref #14451 In order to achieve this, you can either force the re-render or opt-in to the new controllable API of TreeView documented here: https://react.carbondesignsystem.com/?path=/docs/experimental-feature-flags-treeview--overview |
Thanks, I will take a look at that |
Hi @janhassel I tried this but it didn't work. I am on carbon react 1.66.0 version So when I click on the tree view I see that |
I am using alternative for now which will just check the dom for the class and remove it before applying the new class |
@AustinGitHub Could you share a reduced reproduction on Stackblitz or CodeSandbox? From your screenshot I can only assume a few potential issues:
import { unstable_FeatureFlags as FeatureFlags } from '@carbon/react';
<FeatureFlags flags={{
'enable-tree view-controllable': true,
}}>
<TreeView … />
</FeatureFlags>
The |
Package
@carbon/react
Browser
Chrome
Package version
1.60.3
React version
18.12.1
Description
All the versions we are using
I am actively passing through
false
but I see that active is still enabled and when passing through an empty array toselected
it seems to still show selected. This means we can't make the selections toggle-able. How can I get the selection highlight taken off?Reproduction/example
N/A
Steps to reproduce
This is very easy to reproduce.
Code block we have
Video
Screen.Recording.2024-09-06.at.1.44.37.PM.mov
Video of same issue on playground
Screen.Recording.2024-09-06.at.1.47.17.PM.mov
Part of the project I am working on requires a use case where use should be able to deselect the tree that is selected.
Hi @tay1orjones can you help with getting some priority on this please? We are working on a project and need this use case to be supported, thanks!
Suggested Severity
Severity 2 = User cannot complete task, and/or no workaround within the user experience of a given component.
Application/PAL
IBM NextGen DataStage
Code of Conduct
The text was updated successfully, but these errors were encountered: