Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 6560014

Browse files
fixed text input glitch
1 parent ab233a5 commit 6560014

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

‎client/packages/lowcoder/src/comps/comps/textInputComp/textInputConstants.tsx

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -179,15 +179,10 @@ export const useTextInputProps = (props: RecordConstructorToView<typeof textInpu
179179
const inputValue = { ...props.value }.value;
180180

181181
useEffect(() => {
182+
setLocalInputValue(defaultValue);
182183
props.value.onChange(defaultValue)
183184
}, [defaultValue]);
184185

185-
useEffect(() => {
186-
if (inputValue !== localInputValue) {
187-
setLocalInputValue(inputValue);
188-
}
189-
}, [inputValue]);
190-
191186
useEffect(() => {
192187
if (!changeRef.current) return;
193188

@@ -220,8 +215,7 @@ export const useTextInputProps = (props: RecordConstructorToView<typeof textInpu
220215
propsRef.current.value.onChange(value);
221216
propsRef.current.onEvent("change");
222217
}, 1000)
223-
);
224-
218+
);
225219

226220
const handleChange = (e: ChangeEvent<HTMLInputElement>) => {
227221
const value = e.target.value;

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /