Skip to content

Table: row activation plugin #3951

Open

Description

@humbertovirtudes

Part of the Table feature-suite tracker #3639.

Priority: P0 (1 of 3). This is the highest-demand uncovered Table behaviour in the current downstream adoption audit.

Problem Statement

Table selection and row activation are different concepts. Selection answers “which rows are in a set?”; activation answers “which row is current, opened, previewed, or driving adjacent detail UI?”. Astryx has selection, but no reusable way to apply a controlled active-row state and activation interaction.

Consumers therefore attach handlers, active styling, and current-row semantics directly to rows. That work is easy to make inconsistent, can overwrite handlers contributed by other plugins, and must be repeated for sticky cells and keyboard access.

Evidence of Demand

This is the most frequently observed uncovered Table behaviour across downstream applications. A compatible implementation has proven the need for a controlled active key, row-key derivation, press/click activation, optional hover-driven activation for preview surfaces, and active state that remains visible through pinned cells.

The Astryx API should be designed from its own accessibility, theming, and plugin-composition contracts rather than copied verbatim.

Why Existing APIs Do Not Cover This

  • useTableSelection models a selected set and checkbox semantics, not one current row.
  • hasHover is transient visual feedback and does not expose controlled state.
  • Product-level row handlers do not automatically compose with selection, context menus, expansion, or sticky-column styling.

Proposed Direction

Scope a useTableActivation plugin with a controlled model:

const activation = useTableActivation({
  activeKey,
  getRowKey: row => row.id,
  mode: 'press',
  onActivate: (row, key) => setActiveKey(key),
});

<Table plugins={{activation}} />

Open decisions:

  • whether hover activation belongs in the same plugin or a preview-specific sibling;
  • when aria-current is valid, versus exposing only data-active and visual state;
  • how a press-activated row becomes keyboard operable without inventing incorrect button/link semantics;
  • how active styling flows through themeProps('table-row') and pinned cells;
  • event ordering with selection, expansion, navigation, and context-menu plugins.

Accessibility Considerations

  • Press activation must have an equivalent keyboard path.
  • The plugin must not assign role="button", role="link", or aria-current without the corresponding interaction/navigation contract.
  • Hover-only preview may supplement, but never replace, focus or keyboard access.
  • Active state cannot rely on colour alone when it communicates current position.

Performance Considerations

Activation should remain O(1) per rendered row and must not rebuild row maps or recreate every row handler when only the active key changes.

Acceptance Criteria

  • Controlled active-key state with stable row-key derivation.
  • Press activation composes with existing row handlers and other plugins.
  • The keyboard and semantic model is documented and tested.
  • Optional preview/hover behaviour, if retained, has focus parity.
  • Active styling uses a public themeable state and remains visible on pinned cells.
  • Selection and activation can coexist without changing each other’s state.
  • Unit tests cover event composition, controlled updates, disabled/non-activatable rows, and plugin ordering.
  • Public docs and Storybook demonstrate master-detail and current-row use cases.

Activity

  1. added
    enhancement
    on Jul 15, 2026
  2. cixzhang commented on Sep 2, 2026

    @cixzhang
    Contributor

    Thanks for filing this under #3639. Closing as unspecced: there is no active-row concept in main and no accepted (authority: current) record admitting one, and the closest need is already served at the callsite — #5310 added hasRowHighlight to useTableSelection so a product can paint its own active or open row without fighting the selection wash. If activation needs first-class ARIA and keyboard semantics of its own, that deserves an issue that states them, and we are happy to reopen.

  3. added
    component
    needs-scoping
    on Sep 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

area:tablescomponentenhancementneeds-scoping

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions