We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 991b988 commit 65543edCopy full SHA for 65543ed
src/PickerInput/Selector/RangeSelector.tsx
@@ -174,9 +174,7 @@ function RangeSelector<DateType extends object = any>(
174
175
const syncActiveOffset = useEvent(() => {
176
const input = getInput(activeIndex);
177
- if (activeIndex === 0) {
178
- onActiveOffset(0);
179
- } else if (input) {
+ if (input) {
180
const { offsetWidth, offsetLeft, offsetParent } = input.nativeElement;
181
182
let offset = offsetLeft;
@@ -198,7 +196,7 @@ function RangeSelector<DateType extends object = any>(
198
196
[offsetUnit]: offset,
199
197
}));
200
201
- onActiveOffset(offset);
+ onActiveOffset(activeIndex === 0 ? 0 : offset);
202
}
203
});
204
0 commit comments