Skip to content

Commit

Permalink
Fix: Accordion content blinking (#475)
Browse files Browse the repository at this point in the history
* Fix: Accordion content blinking

* Simplify style ternary

---------

Co-authored-by: Joel Arvidsson <joel@oblador.se>
  • Loading branch information
truph01 and oblador authored Aug 27, 2024
1 parent 3500b1d commit 8644394
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Collapsible.js
Original file line number Diff line number Diff line change
Expand Up @@ -186,9 +186,9 @@ export default class Collapsible extends Component {
animating,
} = this.state;
const hasKnownHeight = !measuring && (measured || collapsed);
const style = hasKnownHeight && {
const style = {
overflow: 'hidden',
height: height,
height: hasKnownHeight ? height : 0,
};
const contentStyle = {};
if (measuring) {
Expand Down

0 comments on commit 8644394

Please sign in to comment.