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

Table: detailTransition broken for multiple rows #1216

Open
Thaurin opened this issue Mar 5, 2025 · 0 comments · May be fixed by #1217
Open

Table: detailTransition broken for multiple rows #1216

Thaurin opened this issue Mar 5, 2025 · 0 comments · May be fixed by #1217
Labels
bug Something isn't working

Comments

@Thaurin
Copy link
Contributor

Thaurin commented Mar 5, 2025

Overview of the problem

Oruga version: [0.9.3], also latest develop as of this writing
Vuejs version: [3.5.13]
OS/Browser: Windows 10, latest Chrome

Description

Detail transition is broken and produces a warning in the console when used with a custom detail row that has multiple rows.

Steps to reproduce

  1. Make a Table
  2. Have it have a custom-detail-row
  3. Make a custom template with multiple rows, e.g.:
<template v-slot:detail="props">
  <tr><td>First row</td></tr>
  <tr><td>Second row</td></tr>
  <tr><td>Third row</td></tr>
</template>

Expected behavior

Have it show every row. No warning in the console.

Actual behavior

Only the first row is shown. There is a warning in the console:

chunk-U3LI7FBV.js?v=c9576f5e:2116 [Vue warn]: <transition> can only be used on a single element or component. Use <transition-group> for lists. 
    at <BaseTransition appear=false persisted=false mode=undefined  ... > 
    at <Transition key=1 name="slide" > 
    at <OTable data= Array(17) striped=true hoverable=true  ... > 
    at <TableDaily> 
    at <TabMonthly> 
    at <BaseTransition onAfterEnter=fn<C> onBeforeLeave=fn<K> appear=false  ... > 
    at <Transition key=0 css=true name=undefined  ... > 
    at <OTabItem value=1 label="Month" icon-pack="fas"  ... > 
    at <OTabs id="main-tabs" modelValue=1 onUpdate:modelValue=fn > 
    at <ContentBody> 
    at <App>

Fix

I am not entirely sure if this is the proper way to solve it, but as per the warning, if we change <transition> to <transition-group>, the warning disappears and the Table detail and its transition function as expected. This is true for both single rows, as well as multiple rows.

Pull Request

I will make a PR that demonstrates this fix after finishing this issue.

@mlmoravek mlmoravek added the bug Something isn't working label Mar 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants