fix(ui): prevent accidental navigation in AppTable and VariantsTable #3340
+58
−27
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This PR prevents accidental row navigation in AppTable and VariantsTable when users interact with checkboxes, dropdown menus, and other interactive elements inside table rows.
It applies the shared
shouldIgnoreRowClickguard to these tables to ensure row-level navigation only triggers when the user intentionally clicks the row body.Context
Several tables in the UI implement row-level navigation (
onRow/onClick) alongside interactive child elements such as checkboxes and action menus.In AppTable and VariantsTable, this resulted in the UX issue described in #3254: clicks near or on interactive elements could unintentionally trigger row navigation.
Both components already use
stopPropagation()defensively on individual actions; however, this PR adds a row-level guard as a final safety net, following the same pattern previously used in InfiniteVirtualTable.What changed
AppTable
shouldIgnoreRowClickVariantsTable
shouldIgnoreRowClickNo other logic or behavior was changed.
Why this approach
stopPropagation) already present in these componentsTesting
Manually verified the following scenarios:
AppTable
VariantsTable
Related
Changes since #3263: Branch renamed from
ui/fix-row-click-app-variantstofix-row-click-tablesto resolve GitHub Actions checkout refspec error.