Skip to content

Commit 690b1d5

Browse files
committed
fix(core): fix unmounteRemoveValue property is not work alibaba#827
1 parent 22d03df commit 690b1d5

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

packages/core/src/index.ts

+5-2
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,7 @@ export function createForm(options: IFormCreatorOptions = {}) {
350350
if (
351351
unmountedChanged &&
352352
(published.display !== false || published.visible === false) &&
353-
published.unmountRemoveValue
353+
published.unmountRemoveValue === true
354354
) {
355355
if (published.unmounted) {
356356
if (isValid(published.value)) {
@@ -525,7 +525,6 @@ export function createForm(options: IFormCreatorOptions = {}) {
525525
dataPath,
526526
computeState,
527527
dataType,
528-
unmountRemoveValue,
529528
useDirty: isValid(useDirty) ? useDirty : options.useDirty
530529
})
531530
field.subscription = {
@@ -548,6 +547,10 @@ export function createForm(options: IFormCreatorOptions = {}) {
548547
state.initialValue = formInitialValue
549548
}
550549

550+
if (isValid(unmountRemoveValue)) {
551+
state.unmountRemoveValue = unmountRemoveValue
552+
}
553+
551554
if (isValid(value)) {
552555
// value > formValue > initialValue
553556
state.value = value

0 commit comments

Comments
 (0)