fix: Fix select behaviour

This commit is contained in:
Maksim Eltyshev
2022-07-26 12:49:40 +02:00
parent 1329da3fe5
commit 5ac99c9d1d
15 changed files with 18 additions and 18 deletions
@@ -48,11 +48,11 @@ const ListAdd = React.memo(({ onCreate, onClose }) => {
}, [onCreate, data, setData, selectNameField]);
useEffect(() => {
nameField.current.select();
nameField.current.focus();
}, []);
useDidUpdate(() => {
nameField.current.select();
nameField.current.focus();
}, [selectNameFieldState]);
return (