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: editorCallback does not update a value if the field name of column has nested elements #4814

Closed
Tsareff opened this issue Aug 23, 2023 · 0 comments · Fixed by #4818
Labels
Type: Bug Issue contains a defect related to a specific component.

Comments

@Tsareff
Copy link

Tsareff commented Aug 23, 2023

Describe the bug

Hi primereact team! Hope you are doing well! I'm working with a DataTable in a row edit mode. I have for each row an object with a nested array. I'm able to show the data by accessing the data like parentObject.innerArray.0.value. But when I update the value it adds the new field to initial object with a name "parentObject.innerArray.0.value" and not updates the actual nested array.

Reproducer

https://codesandbox.io/s/delicate-tdd-7w9zmg?file=/src/demo/DataTableEditDemo.js

PrimeReact version

9.5.0

React version

18.x

Language

TypeScript

Build / Runtime

Next.js

Browser(s)

No response

Steps to reproduce the behavior

Please see the codesanbox.

Expected behavior

I expect the field name of the column to be considered as a path and not a name.

@Tsareff Tsareff added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Aug 23, 2023
@melloware 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 Aug 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Issue contains a defect related to a specific component.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants