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

Prevented propagation when DropdownMenu is present in Table #2341

Merged
merged 2 commits into from
Nov 14, 2024

Conversation

smmr-dn
Copy link
Contributor

@smmr-dn smmr-dn commented Nov 14, 2024

Changes

According to @r100-stack's comment in #2337, DropdownMenu might propagate up to the main row which toggles row selection state. Currently, the proposed solution in this PR is to temporarily prevent propagation in the Table stories by using e.stopPropagation() in the onClick event handlers. This approach is a temporary measure until a more permanent solution can be implemented within the internal component code.

Testing

Confirmed that clicking row action items (such as "Edit" or "Delete") does not trigger single row selection.

Before After
table-row-action-before.mp4
table-row-action-after.mp4

Docs

N/A

@smmr-dn smmr-dn mentioned this pull request Nov 14, 2024
1 task
@smmr-dn smmr-dn marked this pull request as ready for review November 14, 2024 19:45
@smmr-dn smmr-dn requested a review from a team as a code owner November 14, 2024 19:45
@smmr-dn smmr-dn requested review from mayank99 and r100-stack and removed request for a team November 14, 2024 19:45
@smmr-dn smmr-dn merged commit faf6c98 into main Nov 14, 2024
18 checks passed
@smmr-dn smmr-dn deleted the uyen/table-row-dropdown-propagation branch November 14, 2024 23:08
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