You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Applying AutoAnimate to table rows destroys row display format #7
I was however testing out animations on tables, sorting (rows moving) and removing filters (adding rows) work great.
But removing rows, collapses the style of them and make them weirdly float outside the table. Also the sizing of the parent during the animation looks off.
Currently havent found a way to do this automatically. Ive done a number of tests, and the sequence of sizing/painting the browser does (for tables) is pretty wacky and – at the moment not very compatible with auto-animate. Still something Im interested in solving for though.
Reacted by 天海 原 / AMAMI Hara, Lavrans Bjerkestrand, Aravind Murali, Nicholas Yiphoiyen, Oswaldo Almazo, Gustavo Sales and Runar Jørgensen
Got the same problem - this nice library unfortunately does not handle row removal well in grid/flex layouts. Spent a whole day trying to figure out what was wrong with my code. Turns out it's the first time it's objectively the library's issue, not mine. ¯\(ツ)/¯
Reacted by Abdulhamit Akaslan, Tapio-adro and sander boer
Finally fixed in #260 🍽️ — removed <tr>s now keep their cell layout while they fade out (no more collapsing cells or rows floating outside the table), including border-spacing, border-collapse, header rows and scaled tables, in Chrome, Firefox and Safari. MUI / shadcn TableBody render plain <tr>s, so they should benefit too — shout if not. Ships in the next release — thanks everyone for the patience (and the repros)!
Activity
justin-schroeder commentedon May 21, 2022
Great point — we might need to handle tables a bit better. We'll try to push out a fix by/on Monday.
kasparsuvi1 commentedon Jun 6, 2022
Is there any update on this?
kasparsuvi1 commentedon Jul 5, 2022
@justin-schroeder Hey, sorry for pinging once more. Have you had time to give a look at it? This seems important feature if it is possible to add.
needim commentedon Aug 9, 2022
just stumbled upon this from https://github.com/samselikoff
sandbox: https://codesandbox.io/s/github/samselikoff/2022-08-04-animated-table?file=/pages/index.tsx
repo: https://github.com/samselikoff/2022-08-04-animated-table
edit: also there is a video in which he explains things: https://www.youtube.com/watch?v=IfAv4NSv-nA
maybe we can get some tips from it and improve this library! I will dive into it tomorrow if I have some time.
justin-schroeder commentedon Aug 10, 2022
Thanks for the suggestion. I took a look at it, and unfortunately its using some techniques that probably wont work for us, like fixed column widths.
rberneder commentedon Nov 11, 2022
Is there any progress on this?
justin-schroeder commentedon Nov 11, 2022
Currently havent found a way to do this automatically. Ive done a number of tests, and the sequence of sizing/painting the browser does (for tables) is pretty wacky and – at the moment not very compatible with auto-animate. Still something Im interested in solving for though.
BorisSavage commentedon Mar 16, 2023
Got the same problem - this nice library unfortunately does not handle row removal well in grid/flex layouts. Spent a whole day trying to figure out what was wrong with my code. Turns out it's the first time it's objectively the library's issue, not mine. ¯\(ツ)/¯
mjyoung commentedon Dec 19, 2023
Has anyone figured out a good workaround for this? Would love to use this with
tbodytrkevinashworth commentedon Feb 16, 2024
For
tabletbodytradd/remove, I'm liking the results a little more than the defaults through simplifying the animation through a custom plugin:I've also added
overflow-hiddento the containing div, which seems to hide the final "flash". But only sometimes.VladBrok commentedon Mar 3, 2024
@kevinashworth, thanks, your solution helped!
siamahnaf commentedon Aug 26, 2024
Animation not working properly on
tbodydBianchii commentedon Mar 28, 2025
Animation not working well for me with TableBody from MUI. Works fine when reordering items. But when deleting them, it looks funky and bad
willashley23 commentedon Mar 29, 2025
Same story with table bodies and ShadCN's Table component. Very janky on entering but especially on exiting.
ShivamJoker commentedon Oct 28, 2025
Facing the same issue with Table.
fix: removed table rows keep their layout while animating out (#7) (#260
justin-schroeder commentedon Nov 22, 2026
Finally fixed in #260 🍽️ — removed
<tr>s now keep their cell layout while they fade out (no more collapsing cells or rows floating outside the table), includingborder-spacing,border-collapse, header rows and scaled tables, in Chrome, Firefox and Safari. MUI / shadcnTableBodyrender plain<tr>s, so they should benefit too — shout if not. Ships in the next release — thanks everyone for the patience (and the repros)!justin-schroeder commentedon Nov 23, 2026
Out now in
@formkit/auto-animate@0.11.0🚢