hypothesis / hypothesis/frontend-shared

Remove `selectedRow` prop from `DataTable` and add a new prop to toggle multi-row selection

Open
#1,368 0 comments 0 reactions 0 assignees View on GitHub
breaking
Dominant language
TypeScript
Stars
8
Forks
5
PR merge metrics
No merged PRs in 30d

Description

https://github.com/hypothesis/frontend-shared/pull/1360 introduced support for multi-row selection, by adding a new `selectedRows` prop.

With those changes, `DataTable` allows multi-row selection only if `selectedRows` is provided, and single-row selection if `selectedRow` is instead. However, we have not explicitly handled what happens if both are provided, other than just preferring `selectedRows` over `selectedRow`.

To make the props API more obvious, let's remove `selectedRow`, and add a new prop to enable/disable multi-row selection.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.