We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c05b4f2 commit 957a3deCopy full SHA for 957a3de
react-common/components/controls/Input.tsx
@@ -69,6 +69,10 @@ export const Input = (props: InputProps) => {
69
70
let container: HTMLDivElement;
71
72
+ React.useEffect(() => {
73
+ setValue(initialValue || "");
74
+ }, [initialValue]);
75
+
76
const handleContainerRef = (ref: HTMLDivElement) => {
77
if (!ref) return;
78
container = ref;
@@ -137,7 +141,7 @@ export const Input = (props: InputProps) => {
137
141
onBlur(value);
138
142
}
139
143
if (!preserveValueOnBlur) {
140
- setValue(undefined);
144
+ setValue("");
145
146
147
0 commit comments