-
Notifications
You must be signed in to change notification settings - Fork 76
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
feat(tree): add none selection mode #5128
feat(tree): add none selection mode #5128
Conversation
@macandcheese Could you test the latest tweaks? 🙇 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✅
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
@@ -177,7 +183,7 @@ | |||
} | |||
|
|||
// dropdown expanded and not selected | |||
:host([has-children][expanded]:not([selected])) > .node-container { | |||
:host([has-children][expanded]:not([selected]):not([selection-mode="none"])) > .node-container { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nitpick: some of these selectors are getting pretty complex. Maybe at some point we move this logic to the tsx file?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I went with the simplest option for now. I think we'll have to do a pass on complex selectors and see which ones are better off as dynamic classes vs. their styling equivalent. cc @benelan
Related Issue: #3121
Summary
This introduces a new
none
selection mode that will still allow tree navigation, but prevent an item from being selected. ThecalciteTreeSelect
event will emit as well after an item is 'selected'.