diff --git a/src/PickerInput/Popup/index.tsx b/src/PickerInput/Popup/index.tsx index 9f8cf65e3..37e12f68f 100644 --- a/src/PickerInput/Popup/index.tsx +++ b/src/PickerInput/Popup/index.tsx @@ -102,6 +102,11 @@ export default function Popup(props: PopupProps { + setRetryTimes(10); + }, [activeInputLeft]); React.useEffect(() => { // `activeOffset` is always align with the active input element @@ -112,6 +117,11 @@ export default function Popup(props: PopupProps Math.max(0, times - 1)); + return; + } + const nextArrowOffset = (rtl ? activeInputRight - arrowWidth : activeInputLeft) - wrapperRect.left; setArrowOffset(nextArrowOffset); @@ -128,7 +138,7 @@ export default function Popup(props: PopupProps(list: T[]) { diff --git a/tests/range.spec.tsx b/tests/range.spec.tsx index 79bef79d5..409fcc914 100644 --- a/tests/range.spec.tsx +++ b/tests/range.spec.tsx @@ -1832,6 +1832,7 @@ describe('Picker.Range', () => { width, left, right: left + width, + height: 1, }; }, offsetWidth: {