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

Adding rows to tables - animate on delete and add #288

Open
alpower opened this issue Oct 24, 2018 · 1 comment
Open

Adding rows to tables - animate on delete and add #288

alpower opened this issue Oct 24, 2018 · 1 comment

Comments

@alpower
Copy link
Contributor

alpower commented Oct 24, 2018

Would be nice to have a facility to animate (read flash) in newly added rows to tables, and also before you remove them, grey them out, so users know what's been changed.

I think you would have to compare data changing in componentShouldUpdate or similar and mark those things that have been removed or added, and somehow add classes to them.

For adding, some CSS like this would suffice:

.flash {
  -webkit-animation-name: flash-animation;
  -webkit-animation-duration: 3s;

  animation-name: flash-animation;
  animation-duration: 3s;
}

@-webkit-keyframes flash-animation {
  from { background: yellow; }
  to   { background: default; }
}

@keyframes flash-animation {
  from { background: yellow; }
  to   { background: default; }
}
@JakeSidSmith
Copy link
Contributor

We can use CSSTransitionGroup to handle the animation of adding / removing items.

Though I think this should be activated with an animate prop, so as not to do so for all tables.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants