Skip to content

Commit

Permalink
fix(input): autofocus (#761)
Browse files Browse the repository at this point in the history
* fix(input): autofocus

* fix(input): shift label with empty but focused input
  • Loading branch information
koretskyhub committed Jul 23, 2021
1 parent dd0144e commit e2880de
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/input/src/Component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ export const Input = React.forwardRef<HTMLInputElement, InputProps>(

const [focusVisible] = useFocus(inputRef, 'keyboard');

const [focused, setFocused] = useState(false);
const [focused, setFocused] = useState(restProps.autoFocus);
const [stateValue, setStateValue] = useState(defaultValue || '');

const filled = Boolean(uncontrolled ? stateValue : value);
Expand Down

0 comments on commit e2880de

Please sign in to comment.