We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 91441c1 commit eca96cfCopy full SHA for eca96cf
packages/core/src/Picker/index.tsx
@@ -73,7 +73,8 @@ const Picker = (props: PickerProps) => {
73
}, [current]);
74
useEffect(() => {
75
if (value !== current) {
76
- const leng = value > date.length - 1 ? date.length - 1 : value;
+ let leng = value > date.length - 1 ? date.length - 1 : value;
77
+ leng = leng < 0 ? 0 : leng;
78
location((style.containerHeight as number) * (leng + 1), leng);
79
setCurrent(leng);
80
}
0 commit comments