Repository navigation
fix(data-table): make selection actions ID-based - #609
Merged
Merged
Conversation
IzumiSy
marked this pull request as ready for review
October 15, 2026 06:06
IzumiSy
added this pull request to stack #614
October 16, 2026 02:25
IzumiSy
force-pushed
the
fix/data-table-selection-action-ids
branch
from
October 16, 2026 04:37
48d6a77 to
3c1de55
Compare
interacsean
approved these changes
Oct 16, 2026
IzumiSy
force-pushed
the
fix/data-table-selection-action-ids
branch
from
October 16, 2026 06:01
3c1de55 to
325aee3
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Motivation
Follow the proposal on #604 to align selection actions with the new ID-based row-selection API.
Controlled
selectedIdsanddefaultSelectedIdscan include records the table has never loaded. The existing bulk-action contract derives eligibility, counts, disabled state, and execution payloads from available row objects. Consequently, visiting another page can change an action's apparent availability and target without changing selection or the underlying records. Actions without a predicate can also silently omit selected records from their payload.Selection actions have not been released yet, so update their contract directly rather than preserve an incomplete row-based operation model.
Design Decision
Selection identity is the operation target
SelectionAction.onClickreceives a fresh click-time snapshot of every selected ID, including unloaded IDs. Remove selection-actioncanApply, automatic eligible counts, and row-availability-based disabling. Consumers own eligibility checks, required fetching, confirmation UI, and execution; backend validation remains authoritative.selectedRowsremains available as a partial cache, but is not used to determine bulk-operation targets. Row actions retaincanApply, since each operates on a concrete loaded row.DataTableActionnow shares presentation only; it andSelectionActionno longer need a row generic.Consumers update selection from actual results
Remove automatic selection clearing and
keepSelection. Neither success nor failure changes selection implicitly. Controlled consumers remove only successfully processed IDs from their current selection, preserving ineligible records and selections made after a confirmation dialog opened.Retain promise-based pending tracking, including
helpers.runfor work started later by a consumer-owned dialog, to preserve busy feedback and prevent overlapping bar actions. Explicit Clear andhelpers.clearSelectionremain intentional full-selection commands. No new confirmation component or execution API is introduced.Summary