Skip to content

Commit f11155a

Browse files
authored
fix: arrow position when placement is right (#822)
1 parent 198c586 commit f11155a

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

src/PickerInput/Selector/RangeSelector.tsx

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -201,13 +201,8 @@ function RangeSelector<DateType extends object = any>(
201201
[offsetUnit]: offset,
202202
}));
203203
const placementRight = placement?.toLowerCase().endsWith('right');
204-
const startOffset = placementRight
205-
? parentElement?.offsetWidth - 20
206-
: 0;
207-
const endOffset = placementRight
208-
? offsetWidth - 20
209-
: offset;
210-
onActiveOffset(activeIndex === 0 ? startOffset : endOffset);
204+
const startOffset = placementRight ? parentElement?.offsetWidth : 0;
205+
onActiveOffset(activeIndex === 0 ? startOffset : offset);
211206
}
212207
});
213208

0 commit comments

Comments
 (0)