Skip to content

Commit

Permalink
docs: Improve row selection docs (#5184)
Browse files Browse the repository at this point in the history
* Improve row selection docs

* Added note about row selection being index based by default
* Added a tanstack link for how row selection can managed with a custom id using the `getRowId` option on the core table api.
* Referenced the use case of manual pagination as it is one of the most likely scenarios that using a custom id is necessary for row selection

This should help developers understand how row selection is implemented.

* reword

---------

Co-authored-by: Kevin Van Cott <kevinvandy656@gmail.com>
  • Loading branch information
setfloat and KevinVandy committed Dec 17, 2023
1 parent cfcc0f1 commit ff9f1f8
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions docs/api/features/row-selection.md
Expand Up @@ -15,6 +15,8 @@ export type RowSelectionTableState = {
}
```
By default, the row selection state uses the index of each row as the row identifiers. Row selection state can instead be tracked with a custom unique row id by passing in a custom [getRowId](../../api/core/table.md#getrowid) function to the the table.
## Table Options
### `enableRowSelection`
Expand Down

0 comments on commit ff9f1f8

Please sign in to comment.