File tree Expand file tree Collapse file tree 1 file changed +2
-8
lines changed
client/packages/lowcoder/src/comps/comps/textInputComp Expand file tree Collapse file tree 1 file changed +2
-8
lines changed Original file line number Diff line number Diff 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 ;
You can’t perform that action at this time.
0 commit comments