You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using the DataTable component with editMode="cell", having an editable frozen row and multiple editable non-frozen rows causes the value from the frozen row to be copied to the first non-frozen row.
melloware
added
Type: Bug
Issue contains a defect related to a specific component.
and removed
Status: Needs Triage
Issue will be reviewed by Core Team and a relevant label will be added as soon as possible
labels
Jan 6, 2025
This issue is happening because while rendering, frozen rows and normal rows are rendered differently but while editing it in onEditingMetaChange, the state editingMetaState is mixing the two.
One solution can be to maintain a different editingMetaState for frozen rows.
Describe the bug
When using the DataTable component with editMode="cell", having an editable frozen row and multiple editable non-frozen rows causes the value from the frozen row to be copied to the first non-frozen row.
Reproducer
https://stackblitz.com/edit/as8ypzgp-y2bs8hf4?file=src%2FApp.tsx
System Information
primereact: ^10.8.5; react: ^18.3.1
Steps to reproduce the behavior
I need to have a frozen row (using the frozenValue property) and multiple non-frozen rows (using the value property).
Both the frozen row and the sub-rows need to be editable (in the provided example, all cells are editable).
Here is how to reproduce the bug:
Click on the Name Column of the frozen row (Do not modify the value !)
Click directly to the Name column of the first non-frozen row
The value of the frozen row is now in the non-frozen row :
Do not hesitate to tell me if this is a problem on my implementation !
Thanks a lot !
Expected behavior
The value of the frozen row should not be copied to the first non-frozen row
The text was updated successfully, but these errors were encountered: