primefaces / primefaces/primereact

DataTable: Cell Selection is Blocked - when having both cellSelection prop and a Column for row selection

Open
#3,162 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Resolution: Workaround Type: Bug
Dominant language
CSS
Stars
8.3k
Forks
1.2k
PR merge metrics
No merged PRs in 30d

Description

Describe the bug

I need to enable both cell selection and rows selection,
but when having a Column for rows selection it blocks the cell selection from happening.
tried to search for similar issues and didnt find.

Reproducer

https://codesandbox.io/s/primereact-test-forked-gq6tjq?file=/src/DataTableTest.tsx

PrimeReact version

8.3.0

React version

18.x

Language

TypeScript

Build / Runtime

Create React App (CRA)

Browser(s)

No response

Steps to reproduce the behavior

go to given sandbox fork, at DataTableTest.tsx line 217, comment out the selection Column for enabling row selection and blocking cell selection.

Expected behavior

enable rows selection and keep cell selection available and enabled too.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the linked CodeSandbox reproducer and inspect DataTableTest.tsx at line 217. Compare behavior with and without the row-selection Column while cellSelection is enabled. Done means both row selection and cell selection work together without one blocking the other.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.