Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DataTable Filter: row filter type error with React18 (while in React.StrictMode) #2947

Closed
dani-ras opened this issue May 30, 2022 · 1 comment · Fixed by #2986
Closed

DataTable Filter: row filter type error with React18 (while in React.StrictMode) #2947

dani-ras opened this issue May 30, 2022 · 1 comment · Fixed by #2986
Labels
Resolution: Duplicate Issue has already been reported or a pull request related to same issue has already been submitted
Milestone

Comments

@dani-ras
Copy link

Describe the bug

While using React.StrictMode, typing in filter row input throws type error:
datatable.esm.js:2842 Uncaught TypeError: Cannot set properties of undefined (setting 'value')

If typing into global filter first, it then allows to type into the row filter inputs eventually.

Reproducer

https://codesandbox.io/s/primereact-test-forked-7dqvg5?file=/src/DatatableFilterTest.js

PrimeReact version

8.1.x

React version

18.x

Language

ALL

Build / Runtime

Create React App (CRA)

Browser(s)

No response

Steps to reproduce the behavior

Go to sandbox link provided, type into row input (while in StrictMode, given) see error.
Type into global filter, then try row inputs - works.
comment out <React.StrictMode>, row inputs work.
TableFilters

Expected behavior

No response

@dani-ras dani-ras added the Type: Bug Issue contains a defect related to a specific component. label May 30, 2022
@melloware melloware added Resolution: Duplicate Issue has already been reported or a pull request related to same issue has already been submitted and removed Type: Bug Issue contains a defect related to a specific component. labels May 30, 2022
@melloware
Copy link
Member

Duplicate of #2777

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Resolution: Duplicate Issue has already been reported or a pull request related to same issue has already been submitted
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants