Skip to content
This repository has been archived by the owner on Feb 8, 2020. It is now read-only.

Commit

Permalink
fix: defer running the animation to next frame
Browse files Browse the repository at this point in the history
  • Loading branch information
satya164 committed Sep 1, 2019
1 parent 5c6e85c commit c7a79a6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/stack/src/views/Stack/Card.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,9 @@ export default class Card extends React.Component<Props> {
// If the style updates during render, setting the value here doesn't work
// We need to defer it a bit so the animation starts properly
requestAnimationFrame(() =>
this.isClosing.setValue(closing ? TRUE : FALSE)
requestAnimationFrame(() =>
this.isClosing.setValue(closing ? TRUE : FALSE)
)
);
}
}
Expand Down

0 comments on commit c7a79a6

Please sign in to comment.