Skip to content

Commit

Permalink
[86byygdea][popper] fixed that switching popper trigger was causing a…
Browse files Browse the repository at this point in the history
… glitch during the close animation
  • Loading branch information
msereniti committed May 27, 2024
1 parent bcef316 commit e181d84
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
6 changes: 6 additions & 0 deletions semcore/popper/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

CHANGELOG.md standards are inspired by [keepachangelog.com](https://keepachangelog.com/en/1.0.0/).

## [5.35.3] - 2024-05-27

### Fixed

- Switching popper trigger was causing a glitch during the close animation.

## [5.35.2] - 2024-05-27

### Fixed
Expand Down
4 changes: 3 additions & 1 deletion semcore/popper/src/Popper.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -222,8 +222,10 @@ class Popper extends Component {
if (!this.triggerRef.current || !this.popperRef.current) return;
if (this.asProps.__disablePopper) return;

const lastPopperReferenceMounted = Boolean(this.lastPopperReference?.parentElement);

this.popper.current = createPopper(
this.lastPopperReference ?? this.triggerRef.current,
lastPopperReferenceMounted ? this.lastPopperReference : this.triggerRef.current,
this.popperRef.current,
this.getPopperOptions(),
);
Expand Down

0 comments on commit e181d84

Please sign in to comment.