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.

Animating an expandable row

See original GitHub issue

Current Behavior

I am using this example posted here https://github.com/gregnb/mui-datatables/issues/214#issuecomment-450537961band it is a bit jarring when the table is expanded without a smooth transition. The new table row just appears.

Expected Behavior

Is there a way to animate the transition when a table row is being expanded? Or could it be easily implemented?

I have tried adding a transition by overriding styling as stated in the documentation, by using “createMuiTheme” but I have unfortunately not been able to make it work. My code looks like this:

const getMuiTheme = () => createMuiTheme({ MuiTableCell: { body: { transition: '0.55s', }, }, }, });

I would really appreciate it if anyone can correct me and tell me what I’m doing wrong 😃

Thank you for you hard work. I love the tables! 👍

Your Environment

Tech Version
Material-UI
MUI-datatables
React

Issue Analytics

  • State:open
  • Created 5 years ago
  • Reactions:2
  • Comments:6

github_iconTop GitHub Comments

5reactions
samuelhnrqcommented, Jun 27, 2020

Okay, so the expand: true option would need a little magic other than simply using or not collapse, other than making the API a little too magical, seems a fine compromise to make. Might send a PR on this…

0reactions
patorjkcommented, Jun 27, 2020

I’m not sure how I’d feel about a version bump for a single feature. I’d be curious if there was a way to add a modifier option though that would give expandableRows the behavior you describe. And if this option was true, then expandableRows would work a little differently and allow the collapse/expand animation.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Table with expandable rows - StackBlitz
Table with expandable rows. ... import {animate, state, style, transition, ... templateUrl: 'table-expandable-rows-example. html',. animations: [.
Read more >
Expand and Collapse List Rows with Animation in SwiftUI
Learn how to expand and collapse list rows with animation in SwiftUI by using List and ForEach in this step-by-step tutorial.
Read more >
Animate expanding table row - Stack Overflow
The problem seems to be that transitions don't like height:auto. I found this solution/workaround and it's giving me 95% of what I wanted:....
Read more >
animated collapsible table-row - CodePen
Adding Classes. In CodePen, whatever you write in the HTML editor is what goes within the <body> tags in a basic HTML5 template....
Read more >
Table Custom Animation | JET Developer Cookbook - Oracle
During an add the table will apply oj-animate-add and then oj-animate-add-active to the table row. During a remove the table will apply oj-animate-remove...
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