Skip to content

Commit e100384

Browse files
authored
fix: form reset的时候父级数据也被还原 (#11860)
1 parent ebca5e2 commit e100384

File tree

1 file changed

+2
-1
lines changed
  • packages/amis-core/src/store

1 file changed

+2
-1
lines changed

Diff for: packages/amis-core/src/store/form.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -765,7 +765,8 @@ export const FormStore = ServiceStore.named('FormStore')
765765

766766
function reset(cb?: (data: any) => void, resetData: boolean = true) {
767767
if (resetData) {
768-
self.data = self.pristine;
768+
// 父级的数据可能已经被修改,__super不应该被修改
769+
self.data = createObject(self.data.__super, self.pristine);
769770
}
770771

771772
// 值可能变了,重新验证一次。

0 commit comments

Comments
 (0)