question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Use transition on row-details

See original GitHub issue

I can’t seem to find a way to implement this, so I wanted to ask here. I want to show the row details with a “slide down” transition, so it looks like a little drawer opening below the row, then closing when _showDetails is removed. I have the CSS transition built already, and I have it working fine with a regular table. Everything displays properly when I toggle _showDetails, just no transition.

Here’s what I have in my code right now:

<b-table  
        :items="items"
        hover
        class="small"
      >
        <template v-slot:row-details="row">
          <transition name="slide-down" appear>
            <div v-if="isWarmingUp(row.item)" class="d-flex w-100">
              <div class="mx-auto text-center pt-2">
                <i class="fas fa-lightbulb fa-2x" />
                <p>Warming up</p>
              </div>
            </div>
            <div v-else class="d-flex w-100">
              <div class="mx-auto">
                Confirming hits
                <p class="text-center">{{ row.item.foundCount || row.item.messageCount }}</p>
              </div>
              <div class="mx-auto">
                Aggregating
                <p class="text-center">{{ row.item.messageCount }}</p>
              </div>
            </div>
          </transition>
        </template>
      </b-table>

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:9 (4 by maintainers)

github_iconTop GitHub Comments

3reactions
dochosscommented, Apr 9, 2020

You were right. v-if on the content inside the transition worked. Had to do some fiddling with it to get it to work with my model, but definitely did the trick. Thanks so much for the help!

For reference, here’s the final pseudocode for it:

<template v-slot:row-details="row">
  <animation-component :row="row" />
</template>

...
AnimationComponent.vue
<transition> 
  <div  v-if="show">
...code from above here...
  </div>
</transition>

data() {
  return {
    show: false
  }
}
created() ){
  this.$nextTick(() => this.show = true);
}
0reactions
TuringJestcommented, Sep 2, 2020

If there was a table option to not hide all row-details by default we could wrap the content into a collapse and just trigger that one. It already works by toggling the detail and then the collapse but we will loose the animation on close of course. So it would need a timeout on close which is a bit inelegant.

Or there could be a row-child slot that would act like a detail and be visible by default.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Table | Components - BootstrapVue
Table render and transition optimization. The primary-key is also used by <b-table> to help Vue optimize the rendering of table rows.
Read more >
Animating WPF DataGrid Row Details - Stack Overflow
Can anyone help me animating the WPF DataGrid row details when it's opened and closed (e.g. slides open like an accordion ...
Read more >
Page Transitions in WPF - Microsoft Q&A
I am creating an application using mvvm I want to change the page transition to DrillInNavigationTransition, so far what I have found is ......
Read more >
smoothly open the hidden “row-details” class, with some ...
Hi Guys, I was wondering if you know about a way to smoothly open the hidden “row-details” class, with some transition, once the ......
Read more >
Detail Row - Vuetable-2
You can use detail-row-transition prop to specify the transition class for your detail component. # CSS Class for Detail Row. The detail row,...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found