-
Notifications
You must be signed in to change notification settings - Fork 1k
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: Edit Programmatic all row cannot read properties of undefined (reading 'data') #3783
Comments
@Jadiction great reproducer I could reproduce it on 8.7.2. But I couldn't using 8.7.3 can you try my reproducer? https://codesandbox.io/s/primereact-test-forked-hcli3o?file=/src/index.js |
@melloware Thanks for the quick reply. I was able to reproduce it on your reproducer using 8.7.3 as well - |
OK maybe I am not clicking fast enough. Looks like this is similar to this issue #3013 |
To reproduce it, I'll hold a key and switch between the first few cells and it usually comes up pretty quickly. I've had this error in my project randomly without intentionally breaking it too, this is just the best way I know I can re-recreate it. |
OK I "think" I have a fix. |
That would be great. I'll be happy to do any testing. |
OK submitted PR. I at least stopped the horrible error. :) |
I pushed the latest update to my reproducer and was still able to reproduce the error. Maybe there's some caching somewhere that I'm missing. |
how did you push the latest up? This code will go in 8.7.4 which has not been released yet? |
Describe the bug
Editing cells in DataTables with editMode set to "cell" can produce errors from the onChange editorCallback. I can reliably produce this when trying to edit several cells in a quick manner, and I'm guessing it happens when trying to type characters before/while clicking the cell to edit. For example, the error will arise if I hold a character like "g" and click around cells.
Below is an example of the error from my reproducer. This is the datatables documentation example from https://www.primefaces.org/primereact/datatable/edit/
Reproducer
https://codesandbox.io/s/primereact-test-forked-vhcvsm
PrimeReact version
8.7.2
React version
18.x
Language
ALL
Build / Runtime
Next.js
Browser(s)
Chrome 108
Steps to reproduce the behavior
- For example, in the top table, you can click between the Code column cells
f230fh0g3
andnvklal433
until it errors.The text was updated successfully, but these errors were encountered: