Fixed infinite saving when input was connected
This commit is contained in:
parent
13e3d6fc19
commit
1ec50a2f27
1 changed files with 2 additions and 2 deletions
|
|
@ -24,10 +24,10 @@ export default function InputComponent({
|
|||
const refInput = useRef<HTMLInputElement>(null);
|
||||
// Clear component state
|
||||
useEffect(() => {
|
||||
if (disabled) {
|
||||
if (disabled && value !== "") {
|
||||
onChange("");
|
||||
}
|
||||
}, [disabled, onChange]);
|
||||
}, [disabled]);
|
||||
|
||||
return (
|
||||
<div className="relative w-full">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue