Skip to content

Commit 81d8e1f

Browse files
fix form component fields not resetting
1 parent a362635 commit 81d8e1f

File tree

1 file changed

+4
-4
lines changed
  • client/packages/lowcoder/src/comps/comps/formComp

1 file changed

+4
-4
lines changed

client/packages/lowcoder/src/comps/comps/formComp/formComp.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -392,9 +392,9 @@ let FormTmpComp = class extends FormBaseComp implements IForm {
392392
switch (action.type) {
393393
case CompActionTypes.UPDATE_NODES_V2: {
394394
const ret = super.reduce(action);
395-
// When the initial value changes, update the form
396-
if (action.value["initialData"] !== undefined) {
397-
queueMicrotask(() => {
395+
if (ret.children.initialData !== this.children.initialData) {
396+
// FIXME: kill setTimeout ?
397+
setTimeout(() => {
398398
this.dispatch(
399399
customAction<SetDataAction>(
400400
{
@@ -404,7 +404,7 @@ let FormTmpComp = class extends FormBaseComp implements IForm {
404404
false
405405
)
406406
);
407-
});
407+
}, 1000);
408408
}
409409
return ret;
410410
}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy