Skip to content

Commit

Permalink
fix(Textfield): character counter inital value (#2056)
Browse files Browse the repository at this point in the history
  • Loading branch information
paal2707 authored May 24, 2024
1 parent 95960f7 commit 7b5df7f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/react/src/components/form/Textfield/Textfield.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ export const Textfield = forwardRef<HTMLInputElement, TextfieldProps>(
readOnly,
} = useTextfield(props);

const [inputValue, setInputValue] = useState(props.defaultValue);
const [inputValue, setInputValue] = useState(props.value || props.defaultValue);
const characterLimitId = `textfield-charactercount-${useId()}`;
const hasCharacterLimit = characterLimit != null;

Expand Down

0 comments on commit 7b5df7f

Please sign in to comment.