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 Expandrows broken in 3.45 #5041

Closed
yormy opened this issue Jan 6, 2024 · 13 comments
Closed

Datatable Expandrows broken in 3.45 #5041

yormy opened this issue Jan 6, 2024 · 13 comments
Labels
Resolution: Cannot Replicate Issue could not be replicated by Core Team

Comments

@yormy
Copy link

yormy commented Jan 6, 2024

Describe the bug

Expanding rows in 3.44 works, and when I upgrade the package to 3.45 it no longer show the expanded section

Reproducer

x

PrimeVue version

3.45

Vue version

3.x

Language

TypeScript

Build / Runtime

Vue CLI App

Browser(s)

chrome

Steps to reproduce the behavior

x

Expected behavior

x

@yormy yormy 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 6, 2024
@mertsincan
Copy link
Member

Hi,

I couldn't replicate it. https://primevue.org/datatable/#row_expansion Can you please attach a stackblitz/codesandbox link to replicate?

@mertsincan mertsincan added Resolution: Cannot Replicate Issue could not be replicated 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 6, 2024
Copy link

github-actions bot commented Jan 6, 2024

We're unable to replicate your issue, if you are able to create a reproducer or add details please edit this issue. This issue will be closed if no activities in 20 days.

@mertsincan
Copy link
Member

Unfortunately, closed for now. If an update comes from your side, please reopen this ticket. Thanks a lot for your understanding!

Best Regard,

@yormy
Copy link
Author

yormy commented Jan 14, 2024

Apparently it was not in the expanded section but in the expander button.

My code is
<Column expander style="width: 1rem"> <template #body="{ data }"> <div v-if="hasExpandedData(props, data)"> <div @click="onExpandClicked(data)" @keydown="onExpandClicked(data)"> <span v-if="isExpanded(data)"> <y-icon icon="icon-collapse" /> </span> <span v-else> <y-icon icon="icon-expand" /> </span> </div> </div> </template> </Column>

This specific code stopped working
The code from your docs <Column expander style="width: 5rem" /> does work

When I add the template it stops working

<template #body>
xxx

So It seems there might be an issue in events firing when I include the template body for the expander. My main goal is to hide the expander when there is no data in the expanded section. Alternative approaches are also welcome

@mertsincan
Copy link
Member

Interesting! Do you have any errors on console?

@mertsincan mertsincan added Status: Pending Review Issue or pull request is being reviewed by Core Team and removed Resolution: Cannot Replicate Issue could not be replicated by Core Team labels Jan 15, 2024
@mertsincan mertsincan added this to the 3.47.0 milestone Jan 15, 2024
@yormy
Copy link
Author

yormy commented Jan 15, 2024

Sadly no..
No errors, no warnings, no info's

1 similar comment
@yormy
Copy link
Author

yormy commented Jan 15, 2024

Sadly no..
No errors, no warnings, no info's

@tugcekucukoglu
Copy link
Member

I want to share a demo link. The 'body' templating is working as expected. If the problem still persists, please send us a reproducer link.

@yormy
Copy link
Author

yormy commented Jan 16, 2024

Wierd, when I open your link the 'togger' button does not do anything. Not in chrome, not in chrome-anonymous, not in firefox

@tugcekucukoglu tugcekucukoglu added Resolution: Cannot Replicate Issue could not be replicated by Core Team and removed Status: Pending Review Issue or pull request is being reviewed by Core Team labels Jan 22, 2024
Copy link

We're unable to replicate your issue, if you are able to create a reproducer or add details please edit this issue. This issue will be closed if no activities in 20 days.

@yormy
Copy link
Author

yormy commented Jan 22, 2024

What about for other people?. When I click in your link the 'expand all' button all rows expand, when I click on toggle nothing happens

@mertsincan
Copy link
Member

Hi @yormy,

By adding a template to the expander button, you override its default behaviour. That's why you need to implement the toggle/collapse behaviour manually. I have attached a working example below. If your problem still persists, please send us a stackblitz link and write what steps we need to follow to see your case.

https://stackblitz.com/edit/16r7fy-5epxpj?file=src%2FApp.vue

Best Regards,

@tugcekucukoglu
Copy link
Member

We add rowTogglerCallback for body template. If you want to track it, please check #5123. The demo that I've shared will work fine with the next version.

@tugcekucukoglu tugcekucukoglu removed this from the 3.47.0 milestone Jan 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Resolution: Cannot Replicate Issue could not be replicated by Core Team
Projects
None yet
Development

No branches or pull requests

3 participants