diff --git a/package.json b/package.json index 0d4aaba81..661a89fc4 100644 --- a/package.json +++ b/package.json @@ -48,7 +48,7 @@ "rc-motion": "^2.0.1", "rc-trigger": "^5.0.4", "rc-util": "^5.0.1", - "rc-virtual-list": "^3.0.3", + "rc-virtual-list": "^3.2.0", "warning": "^4.0.3" }, "devDependencies": { diff --git a/src/OptionList.tsx b/src/OptionList.tsx index d3864c56d..d2f7738ab 100644 --- a/src/OptionList.tsx +++ b/src/OptionList.tsx @@ -154,6 +154,11 @@ const OptionList: React.RefForwardingComponent< } }); + // Force trigger scrollbar visible when open + if (open) { + listRef.current?.scrollTo(undefined); + } + return () => clearTimeout(timeoutId); }, [open]);