Skip to content

Commit

Permalink
- Update popover position on resize
Browse files Browse the repository at this point in the history
  • Loading branch information
duduBTW committed Nov 17, 2024
1 parent 9380b5e commit 2cee343
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/renderer/src/components/popover/Popover.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,14 @@ function useProviderValue(props: Props) {
});
});

onMount(() => {
window.addEventListener("resize", listenResize);

onCleanup(() => {
window.removeEventListener("resize", listenResize);
});
});

createEffect(() => {
const triggerElement = triggerRef();
if (!triggerElement) {
Expand Down

0 comments on commit 2cee343

Please sign in to comment.