Skip to content

Commit 957a3de

Browse files
committed
fix measures field in playback controls
1 parent c05b4f2 commit 957a3de

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

react-common/components/controls/Input.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,10 @@ export const Input = (props: InputProps) => {
6969

7070
let container: HTMLDivElement;
7171

72+
React.useEffect(() => {
73+
setValue(initialValue || "");
74+
}, [initialValue]);
75+
7276
const handleContainerRef = (ref: HTMLDivElement) => {
7377
if (!ref) return;
7478
container = ref;
@@ -137,7 +141,7 @@ export const Input = (props: InputProps) => {
137141
onBlur(value);
138142
}
139143
if (!preserveValueOnBlur) {
140-
setValue(undefined);
144+
setValue("");
141145
}
142146
}
143147

0 commit comments

Comments
 (0)