primereact icon indicating copy to clipboard operation
primereact copied to clipboard

DataTable: multiple cell selection on mobile does not work as expected

Open samh0lmes opened this issue 2 years ago • 3 comments

Describe the bug

On mobile, with selectionMode set to "multiple", clicking one cell clears out the rest. It works correctly on larger screen.

(not working correctly on mobile) mobile

(working correctly on desktop) desktop

I am passing these props to table

cellSelection={ true }
selectionMode="multiple"
metaKeySelection={false}
selection={selectedPermissions}
onSelectionChange={(e) => setSelectedPermissions(e.value)}
onCellSelect={onCellSelect}
onCellUnselect={onCellUnselect}
dataKey="id"
isDataSelectable={(event) => (event.data.field !== 'name')}
rowGroupMode="rowspan"
groupRowsBy="name"

Could be something I'm not passing correctly but since it's working on desktop, wondering if it is a bug.

Thanks so much!

Reproducer

No response

PrimeReact version

9.6.2

React version

17.x

Language

ES6

Build / Runtime

Create React App (CRA)

Browser(s)

Chrome

Steps to reproduce the behavior

  1. Create DataTable with cellSelection={true} selectionMode="multiple"
  2. Click 2 cells
  3. See both of them stay selected
  4. Change dimensions to iphone 12 on dev tools
  5. Click 2 cells
  6. See only one can be selected at a time

Expected behavior

Multiple cells should stay selected

samh0lmes avatar Sep 23 '23 00:09 samh0lmes

I add labels to the ticket. Most likely a bug

melloware avatar Sep 23 '23 02:09 melloware

This issue has been automatically marked as stale. If this issue is still affecting you with the latest version, please leave any comment, and we will keep it open. We are sorry that we have not been able to prioritize it yet. If you have any new additional information, please include it with your comment!

github-actions[bot] avatar Sep 18 '24 01:09 github-actions[bot]

Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please create a new issue with up-to-date information. Thank you for your understanding!

github-actions[bot] avatar Sep 25 '24 01:09 github-actions[bot]

Can we reopen this?

samh0lmes avatar Mar 12 '25 19:03 samh0lmes