Skip to content

Commit 2bb0635

Browse files
authored
fix: rtl miss left calc (#908)
1 parent 1dd9709 commit 2bb0635

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/PickerInput/Popup/index.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -112,9 +112,8 @@ export default function Popup<DateType extends object = any>(props: PopupProps<D
112112

113113
// Arrow Offset
114114
const wrapperRect = wrapperRef.current.getBoundingClientRect();
115-
const nextArrowOffset = rtl
116-
? activeInputRight - arrowWidth
117-
: activeInputLeft - wrapperRect.left;
115+
const nextArrowOffset =
116+
(rtl ? activeInputRight - arrowWidth : activeInputLeft) - wrapperRect.left;
118117
setArrowOffset(nextArrowOffset);
119118

120119
// Container Offset

0 commit comments

Comments
 (0)