dropdown
dropdown copied to clipboard
Dropdown is causing Input to lose focus when the menu opens @3.2.3
Hello, here's how im using the Dropdown
from antd
:
const [menuVisible, setMenuVisible] = useState(false);
const onInputFocus = useCallback(() => setMenuVisible(true), []);
const onInputBlur = useCallback(() => setMenuVisible(false), []);
<Dropdown overlay={OptionMenu} visible={menuVisible}>
<Input
className={styles.input}
onFocus={onInputFocus}
onBlur={onInputBlur}
/>
</Dropdown>
And I can confirm that every time the Dropdown
opens, the onBlur
on Input
is triggered.
The issue is introduced in version @3.2.3
, and I reverted back to use version @3.2.2
and the issue is fixed.