Skip to content
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

Merged
merged 3 commits into from
Aug 16, 2022

Conversation

jcfranco
Copy link
Member

@jcfranco jcfranco commented Aug 10, 2022

Related Issue: #3121

Summary

This introduces a new none selection mode that will still allow tree navigation, but prevent an item from being selected. The calciteTreeSelect event will emit as well after an item is 'selected'.

@github-actions github-actions bot added the enhancement Issues tied to a new feature or request. label Aug 10, 2022
@jcfranco jcfranco requested a review from macandcheese August 15, 2022 18:31
@jcfranco jcfranco marked this pull request as ready for review August 15, 2022 18:31
@jcfranco jcfranco requested a review from a team as a code owner August 15, 2022 18:31
@jcfranco
Copy link
Member Author

@macandcheese Could you test the latest tweaks? 🙇

Copy link
Contributor

@macandcheese macandcheese left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

@driskull driskull left a 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 {
Copy link
Member

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?

Copy link
Member Author

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

@jcfranco jcfranco merged commit e96bfbe into master Aug 16, 2022
@jcfranco jcfranco deleted the jcfranco/3121-add-none-selection-mode-to-tree branch August 16, 2022 19:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Issues tied to a new feature or request.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants