Skip to content

Commit

Permalink
small fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Edgar Kocuba committed Oct 21, 2023
1 parent 614bb50 commit e8a2cab
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/components/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export const Header: React.FC<Props> = React.memo(({

useEffect(() => {
inputRef.current?.focus();
}, [inputRef, pageIsLoaded]);
}, [inputRef, pageIsLoaded, uncompletedTodos, todosLength]);

return (
<header className="todoapp__header">
Expand All @@ -48,6 +48,8 @@ export const Header: React.FC<Props> = React.memo(({
>
<input
ref={inputRef}
// eslint-disable-next-line jsx-a11y/no-autofocus
// autoFocus
data-cy="NewTodoField"
type="text"
className="todoapp__new-todo"
Expand Down

0 comments on commit e8a2cab

Please sign in to comment.