Skip to content

Commit

Permalink
fix(AccordionItem): animate open/close when open prop is specified (#…
Browse files Browse the repository at this point in the history
…7876)

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
  • Loading branch information
emyarod and kodiakhq[bot] authored Feb 25, 2021
1 parent b4d91b9 commit 56d12e9
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions packages/react/src/components/Accordion/AccordionItem.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ function AccordionItem({
});

if (open !== prevIsOpen) {
setAnimation(isOpen ? 'collapsing' : 'expanding');
setIsOpen(open);
setPrevIsOpen(open);
}
Expand Down

0 comments on commit 56d12e9

Please sign in to comment.