Skip to content

Commit

Permalink
fix(popover): fix popover update visible error (#1596)
Browse files Browse the repository at this point in the history
  • Loading branch information
berber1016 committed Dec 3, 2021
1 parent 903517e commit a40bddc
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/popover/Popover.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,11 @@ const Popover = (props: PopoverProps) => {
if (!(overContentRef.current && enterable)) {
setVisible(realVisible);
onVisibleChange?.(realVisible);
}
if (realVisible) {
update?.();
if (realVisible) {
setTimeout(() => {
update?.();
}, 0);
}
}
},
[disabled, enterable, setVisible, onVisibleChange, update]
Expand Down

1 comment on commit a40bddc

@vercel
Copy link

@vercel vercel bot commented on a40bddc Dec 3, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.