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: persistent expandedRows with dataKey doesn't working properly #5057

Closed
reitowo opened this issue Jan 10, 2024 · 6 comments
Closed
Assignees
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Milestone

Comments

@reitowo
Copy link

reitowo commented Jan 10, 2024

Describe the bug

I use pinia to store the expanded state { '1': true }, but when the page refresh and the data got loaded later, it doesn't expand and need to reset the expanded value manually to make it work. See reproducer.

Reproducer

https://codesandbox.io/p/sandbox/practical-beaver-mlv9gy

PrimeVue version

3.46

Vue version

3.x

Language

TypeScript

Build / Runtime

Vite

Browser(s)

No response

Steps to reproduce the behavior

No response

Expected behavior

No response

@reitowo reitowo added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Jan 10, 2024
@mertsincan
Copy link
Member

Hi @cnSchwarzer,

Unfortunately, your codesandbox link doesn't open. Could you please update it? Thanks a lot for your report!

Best Regards,

@mertsincan mertsincan added Resolution: Needs Revision The pull request can't be merged. Conflicts need to be corrected or documentation and code updated. 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 11, 2024
@mertsincan mertsincan added this to the 3.47.0 milestone Jan 11, 2024
@reitowo
Copy link
Author

reitowo commented Jan 11, 2024

Does the codesandbox service down? I cannot open any box currently.
Edit: Seems they are having some issue. https://status.codesandbox.io/
Please kindly check it again later. Thanks!

@mertsincan
Copy link
Member

Of course, I'll check again before the next version is released. Thanks a lot fo your update ;)

@mertsincan mertsincan added Status: Pending Review Issue or pull request is being reviewed by Core Team and removed Resolution: Needs Revision The pull request can't be merged. Conflicts need to be corrected or documentation and code updated. labels Jan 11, 2024
@reitowo
Copy link
Author

reitowo commented Jan 11, 2024

It can open now.

@mertsincan
Copy link
Member

Hi @cnSchwarzer,

It opened. But, unfortunately, I couldn't replicate this issue. How can I replicate your case?

@reitowo
Copy link
Author

reitowo commented Jan 11, 2024

Hi, @mertsincan

Click on row expand and refresh the page, you can see that the row is not expanded as expected

However, like in the commented code, if we set expanded key to {} and set to the stored value in nextTick, it works.

You can see localStorage that the expanded key is stored but the component doesn't expand it.

PS: The vite seems report a vnode event obsolete warning, I don't know what caused this. And if I use vue >= 3.4 it will fail to compile

@reitowo reitowo changed the title DataTable: expandedRows with dataKey doesn't working properly DataTable: expandedRows with persistent dataKey doesn't working properly Jan 13, 2024
@reitowo reitowo changed the title DataTable: expandedRows with persistent dataKey doesn't working properly DataTable: expandedRows with pdataKey doesn't working properly Jan 13, 2024
@reitowo reitowo changed the title DataTable: expandedRows with pdataKey doesn't working properly DataTable: persistent expandedRows with dataKey doesn't working properly Jan 13, 2024
@mertsincan mertsincan added Type: Bug Issue contains a bug related to a specific component. Something about the component is not working and removed Status: Pending Review Issue or pull request is being reviewed by Core Team labels Jan 15, 2024
@mertsincan mertsincan self-assigned this Jan 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Projects
None yet
Development

No branches or pull requests

2 participants