Skip to content

Commit

Permalink
Update Input.tsx
Browse files Browse the repository at this point in the history
  • Loading branch information
zardoy authored Sep 3, 2024
1 parent f5a25e7 commit 54b6dd6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/react/Input.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ interface Props extends React.ComponentProps<'input'> {
export default ({ autoFocus, rootStyles, inputRef, validateInput, defaultValue, ...inputProps }: Props) => {
const ref = useRef<HTMLInputElement>(null!)
const [validationStyle, setValidationStyle] = useState<CSSProperties>({})
const [value, setValue] = useState(defaultValue ?? '')
const [value, setValue] = useState(defaultValue ?? props.value ?? '')

Check failure on line 15 in src/react/Input.tsx

View workflow job for this annotation

GitHub Actions / build-and-deploy

Cannot find name 'props'.

useEffect(() => {
setValue(inputProps.value === '' || inputProps.value ? inputProps.value : value)
Expand Down

0 comments on commit 54b6dd6

Please sign in to comment.