Skip to content

Commit

Permalink
remove unused popover ref callbacks
Browse files Browse the repository at this point in the history
  • Loading branch information
mkhutornyi committed Jan 30, 2024
1 parent aaa658f commit e63e68c
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 8 deletions.
6 changes: 0 additions & 6 deletions src/components/PopoverProvider/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,6 @@ function PopoverContextProvider(props: PopoverContextProps) {
}

activePopoverRef.current.close();
if (activePopoverRef.current.onCloseCallback) {
activePopoverRef.current.onCloseCallback();
}
activePopoverRef.current = null;
setIsOpen(false);
}, []);
Expand Down Expand Up @@ -107,9 +104,6 @@ function PopoverContextProvider(props: PopoverContextProps) {
closePopover(activePopoverRef.current.anchorRef);
}
activePopoverRef.current = popoverParams;
if (popoverParams?.onOpenCallback) {
popoverParams.onOpenCallback();
}
setIsOpen(true);
},
[closePopover],
Expand Down
2 changes: 0 additions & 2 deletions src/components/PopoverProvider/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ type AnchorRef = {
ref: RefObject<View | HTMLDivElement>;
close: (anchorRef?: RefObject<View | HTMLDivElement>) => void;
anchorRef: RefObject<View | HTMLDivElement>;
onOpenCallback?: () => void;
onCloseCallback?: () => void;
};

export type {PopoverContextProps, PopoverContextValue, AnchorRef};

0 comments on commit e63e68c

Please sign in to comment.