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

TableBody: Render "BodyRow" binding dataKey of props to key attribute #5006

Closed
IanLai0201 opened this issue Dec 28, 2023 · 2 comments
Closed
Assignees
Labels
Type: Enhancement Issue contains an enhancement related to a specific component. Additional functionality has been add
Milestone

Comments

@IanLai0201
Copy link

Describe the bug

In 3.45.0 version.
"DataTable" render "BodyRow" binding row index to key attribute.

Is it possible to switch to using 'dataKey' of props for improved reusability during rendering?

image

Reproducer

https://stackblitz.com/edit/hsltmk?file=src%2FApp.vue

PrimeVue version

3.45.0

Vue version

3.x

Language

TypeScript

Build / Runtime

Vite

Browser(s)

No response

Steps to reproduce the behavior

No response

Expected behavior

No response

@IanLai0201 IanLai0201 added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Dec 28, 2023
@tugcekucukoglu tugcekucukoglu added Status: Pending Review Issue or pull request is being reviewed by Core Team 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 5, 2024
@IanLai0201
Copy link
Author

Excuse me, are there any plans to adjust this issue, or are there other reasons for setting the index as the key?

In my project, custom cell content components have their private states, and due to the reuse of components, it leads to state confusion. Even if I bind a key to force the custom component to re-render, it results in the loss of the original state.

@mertsincan
Copy link
Member

You're right! I'll update it before the milestone is released.

@mertsincan mertsincan added this to the 3.48.0 milestone Jan 29, 2024
@mertsincan mertsincan self-assigned this Jan 29, 2024
@mertsincan mertsincan added Type: Enhancement Issue contains an enhancement related to a specific component. Additional functionality has been add and removed Status: Pending Review Issue or pull request is being reviewed by Core Team labels Feb 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Enhancement Issue contains an enhancement related to a specific component. Additional functionality has been add
Projects
None yet
Development

No branches or pull requests

3 participants