Skip to content

Commit 4b7cb33

Browse files
authored
chore: Show scrollbar when open (#557)
* chore: Show scrollbar when open * fix logic
1 parent d0772dd commit 4b7cb33

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
"rc-motion": "^2.0.1",
4949
"rc-trigger": "^5.0.4",
5050
"rc-util": "^5.0.1",
51-
"rc-virtual-list": "^3.0.3",
51+
"rc-virtual-list": "^3.2.0",
5252
"warning": "^4.0.3"
5353
},
5454
"devDependencies": {

src/OptionList.tsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,11 @@ const OptionList: React.RefForwardingComponent<
154154
}
155155
});
156156

157+
// Force trigger scrollbar visible when open
158+
if (open) {
159+
listRef.current?.scrollTo(undefined);
160+
}
161+
157162
return () => clearTimeout(timeoutId);
158163
}, [open]);
159164

0 commit comments

Comments
 (0)