DataTable: cellSelection type doesn't allow boolean values, only false or undefined #6376
Labels
Type: Bug
Issue contains a defect related to a specific component.
Typescript
Issue or pull request is *only* related to TypeScript definition
Milestone
Describe the bug
Trying to implement a DataTable that triggers an action when I only select/click on a specific cell instead of the entire row, I found from the documentation that you enable this functionality by setting cellSelection.
Looking into the datatable.d.ts file I see that this is:
Basically it does not allow setting cellSelection to true. The documentation says the same thing here.
I do not thing it's intended as if I //@ts-ignore this I am able to click the cells and launch the aforementioned action.
Shouldn't the type be cellSelection?: boolean | undefined so it allows selecting a single cell?
P.S. (LE) I can contribute with the type fix if it's up for grabs :)
Thank you!
Reproducer
No response
PrimeReact version
10.6.3
React version
18.x
Language
TypeScript
Build / Runtime
Next.js
Browser(s)
No response
Steps to reproduce the behavior
No response
Expected behavior
No response
The text was updated successfully, but these errors were encountered: