From 2f988405796a631b89d05e63927c4687ac88310c Mon Sep 17 00:00:00 2001 From: Mario Subotic Date: Thu, 27 Jan 2022 14:28:56 +0800 Subject: [PATCH 1/2] fix(dropdown): fix dropdown scrollIntoView is not a function error --- lib/src/Dropdown/Dropdown.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/src/Dropdown/Dropdown.tsx b/lib/src/Dropdown/Dropdown.tsx index aef661d7c..928698daa 100644 --- a/lib/src/Dropdown/Dropdown.tsx +++ b/lib/src/Dropdown/Dropdown.tsx @@ -355,7 +355,7 @@ export const Dropdown: React.FC = React.forwardRef( React.useEffect(() => { // scroll the focused item into view - getOptionsRef()?.[focusedIndex]?.scrollIntoView(false); + getOptionsRef()?.[focusedIndex]?.scrollIntoView?.(false); }, [focusedIndex, getOptionsRef]); return ( From 8d6b5e5c053f29f9aecbaae9ed2e479afa547429 Mon Sep 17 00:00:00 2001 From: Mario Subotic Date: Thu, 27 Jan 2022 14:54:14 +0800 Subject: [PATCH 2/2] fix(dropdown): fixes overflow behaviour --- lib/src/Dropdown/dropdown.scss | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/src/Dropdown/dropdown.scss b/lib/src/Dropdown/dropdown.scss index 802d59ae3..1571ce31c 100644 --- a/lib/src/Dropdown/dropdown.scss +++ b/lib/src/Dropdown/dropdown.scss @@ -80,6 +80,7 @@ float: none; overflow: auto; z-index: $zindex-popover; + overscroll-behavior: contain; > p { margin: 0;