Skip to content

refactor(treeview): revert button expander click logic to to allow multiple selection without checkbox#6239

Closed
marioleandro wants to merge 1 commit intoliferay:masterfrom
marioleandro:refactor/restore-treeview-button-expander
Closed

refactor(treeview): revert button expander click logic to to allow multiple selection without checkbox#6239
marioleandro wants to merge 1 commit intoliferay:masterfrom
marioleandro:refactor/restore-treeview-button-expander

Conversation

@marioleandro
Copy link
Copy Markdown
Member

@marioleandro marioleandro commented Jan 14, 2026

This commit restores the original separation of behavior between the
tree item expander and the selection button.

Reason
Without the expansion button separation, in some specific cases, items that have children become 'dead leaves' for navigation if the click is used only for selection. Restoring this button is critical for this workflows where selection and navigation coexist.

image

By restoring this separation:

  • The expander (arrow) remains responsible for toggling node visibility.
  • The item button (label) correctly handles selection events, allowing
    for native multi-selection behavior using keyboard modifiers.
  • This enables multi-selection functionality even in TreeView
    configurations where checkboxes are not present.

@vercel
Copy link
Copy Markdown

vercel Bot commented Jan 14, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
clayui.com Ready Ready Preview, Comment Jan 20, 2026 5:23pm
storybook.clayui.com Ready Ready Preview, Comment Jan 20, 2026 5:23pm

Request Review

Comment thread packages/clay-core/src/tree-view/TreeViewItem.tsx
Copy link
Copy Markdown
Member

@gabsprates gabsprates left a comment

Choose a reason for hiding this comment

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

LGTM

@marioleandro
Copy link
Copy Markdown
Member Author

Closing this and resent in liferay-platform-experience/liferay-portal#1641

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants