Skip to content

Add event listener for internal grid selection state #2884

@pwang347

Description

@pwang347

Use case

We would like to consume the grid selection state (i.e. selected cell column and row) to update styling in custom renderers (more complicated styling than CSS), as well as to use as state for certain operations.

See #2881

Specifically, the proposed change should handle all selection state events, e.g. clicking, keyboard navigation, programmatic and so forth.

Proposed solution

Add API onSelectionChange on the DataGridProps interface exposing the selectedPosition state (and possibly prevSelectedPosition).

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions