mirror of
https://github.com/plankanban/planka.git
synced 2025-07-18 20:59:44 +02:00
fix: Fix select behaviour
This commit is contained in:
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 (
|
||||
|
|
|
@ -35,7 +35,7 @@ const AddStep = React.memo(({ onCreate, onClose }) => {
|
|||
}, [onCreate, onClose, data]);
|
||||
|
||||
useEffect(() => {
|
||||
nameField.current.select();
|
||||
nameField.current.focus();
|
||||
}, []);
|
||||
|
||||
return (
|
||||
|
|
|
@ -79,7 +79,7 @@ const NameEdit = React.forwardRef(({ children, defaultValue, onUpdate }, ref) =>
|
|||
|
||||
useEffect(() => {
|
||||
if (isOpened) {
|
||||
field.current.ref.current.select();
|
||||
field.current.ref.current.focus();
|
||||
}
|
||||
}, [isOpened]);
|
||||
|
||||
|
|
|
@ -76,7 +76,7 @@ const CommentEdit = React.forwardRef(({ children, defaultData, onUpdate }, ref)
|
|||
|
||||
useEffect(() => {
|
||||
if (isOpened) {
|
||||
textField.current.ref.current.select();
|
||||
textField.current.ref.current.focus();
|
||||
}
|
||||
}, [isOpened]);
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@ const TextFileAddModal = React.memo(({ content, onCreate, onClose }) => {
|
|||
}, [content, onCreate, onClose, data]);
|
||||
|
||||
useEffect(() => {
|
||||
nameField.current.select();
|
||||
nameField.current.focus();
|
||||
}, []);
|
||||
|
||||
return (
|
||||
|
|
|
@ -66,7 +66,7 @@ const DescriptionEdit = React.forwardRef(({ children, defaultValue, onUpdate },
|
|||
|
||||
useEffect(() => {
|
||||
if (isOpened) {
|
||||
field.current.ref.current.select();
|
||||
field.current.ref.current.focus();
|
||||
}
|
||||
}, [isOpened]);
|
||||
|
||||
|
|
|
@ -81,12 +81,12 @@ const Add = React.forwardRef(({ children, onCreate }, ref) => {
|
|||
|
||||
useEffect(() => {
|
||||
if (isOpened) {
|
||||
nameField.current.ref.current.select();
|
||||
nameField.current.ref.current.focus();
|
||||
}
|
||||
}, [isOpened]);
|
||||
|
||||
useDidUpdate(() => {
|
||||
nameField.current.ref.current.select();
|
||||
nameField.current.ref.current.focus();
|
||||
}, [selectNameFieldState]);
|
||||
|
||||
if (!isOpened) {
|
||||
|
|
|
@ -71,7 +71,7 @@ const NameEdit = React.forwardRef(({ children, defaultValue, onUpdate }, ref) =>
|
|||
|
||||
useEffect(() => {
|
||||
if (isOpened) {
|
||||
field.current.ref.current.select();
|
||||
field.current.ref.current.focus();
|
||||
}
|
||||
}, [isOpened]);
|
||||
|
||||
|
|
|
@ -65,12 +65,12 @@ const CardAdd = React.memo(({ isOpened, onCreate, onClose }) => {
|
|||
|
||||
useEffect(() => {
|
||||
if (isOpened) {
|
||||
nameField.current.ref.current.select();
|
||||
nameField.current.ref.current.focus();
|
||||
}
|
||||
}, [isOpened]);
|
||||
|
||||
useDidUpdate(() => {
|
||||
nameField.current.ref.current.select();
|
||||
nameField.current.ref.current.focus();
|
||||
}, [selectNameFieldState]);
|
||||
|
||||
return (
|
||||
|
|
|
@ -83,7 +83,7 @@ const Login = React.memo(
|
|||
}, [onAuthenticate, data]);
|
||||
|
||||
useEffect(() => {
|
||||
emailOrUsernameField.current.select();
|
||||
emailOrUsernameField.current.focus();
|
||||
}, []);
|
||||
|
||||
useEffect(() => {
|
||||
|
|
|
@ -33,7 +33,7 @@ const ProjectAddModal = React.memo(({ defaultData, isSubmitting, onCreate, onClo
|
|||
}, [onCreate, data]);
|
||||
|
||||
useEffect(() => {
|
||||
nameField.current.select();
|
||||
nameField.current.focus();
|
||||
}, []);
|
||||
|
||||
return (
|
||||
|
|
|
@ -88,7 +88,7 @@ const UserAddStep = React.memo(
|
|||
}, [onCreate, data]);
|
||||
|
||||
useEffect(() => {
|
||||
emailField.current.select();
|
||||
emailField.current.focus();
|
||||
}, []);
|
||||
|
||||
useEffect(() => {
|
||||
|
|
|
@ -87,7 +87,7 @@ const UserEmailEditStep = React.memo(
|
|||
}, [email, usePasswordConfirmation, onUpdate, onClose, data]);
|
||||
|
||||
useEffect(() => {
|
||||
emailField.current.select();
|
||||
emailField.current.focus();
|
||||
}, []);
|
||||
|
||||
useEffect(() => {
|
||||
|
|
|
@ -70,7 +70,7 @@ const UserPasswordEditStep = React.memo(
|
|||
}, [usePasswordConfirmation, onUpdate, data]);
|
||||
|
||||
useEffect(() => {
|
||||
passwordField.current.select();
|
||||
passwordField.current.focus();
|
||||
}, []);
|
||||
|
||||
useEffect(() => {
|
||||
|
|
|
@ -87,7 +87,7 @@ const UserUsernameEditStep = React.memo(
|
|||
}, [username, usePasswordConfirmation, onUpdate, onClose, data]);
|
||||
|
||||
useEffect(() => {
|
||||
usernameField.current.select();
|
||||
usernameField.current.focus();
|
||||
}, []);
|
||||
|
||||
useEffect(() => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue