Your users ask for "the top 3" or "the best one", and the grid sorts and selects those rows. The other rows stay visible: selecting highlights, it does not hide.
Show the top 3 employees by rating, highest first
sort rating descendingselect the first 3 rowsSelect the first 4 employees alphabetically by name
sort name ascendingselect the first 4 rowsA follow-up that only sorts clears the selection. After "Show the top 3 employees by rating, highest first":
Now sort all employees by name A to Z instead
sort name ascendingSelection counts the rows after filtering and sorting. Looking up one named row ("what is Anna's email?") filters to it and selects nothing.
| Setting | Where | With MUI's stock resolver | With the Gridsay helper |
|---|---|---|---|
rowSelection | Grid prop | false: the grid sorts and selects nothing, and the panel still reports success. | false: Gridsay sorts and leaves the rows unselected. |
checkboxSelection | Grid prop | Optional. Selected rows are highlighted without checkboxes; checkboxes make them easier to see. | The same. |
| Pagination | Grid | Asking for more rows than the current page holds fails with an error in the panel, after the sort is applied. | Selects across pages, from all the filtered and sorted rows. |
| Fewer rows than asked for | Grid | Fails with an error in the panel, after the sort is applied. | Selects the rows that exist. |
dataSource | Grid prop | Not tested by Gridsay. | Waits for the new rows, then selects at most the rows of the loaded page. |
Every answer replaces the selection: rows your user selected by hand are unselected, including by an answer that selects nothing.
rowSelection={false}, the question is not declined: the sort is applied and nothing is selected.