Skip to content

Commit

Permalink
fix(@formily/core): fix unmountClearStates flags is not right (#944)
Browse files Browse the repository at this point in the history
  • Loading branch information
soulwu authored Jul 3, 2020
1 parent 9215592 commit 754a55f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/core/src/internals.ts
Original file line number Diff line number Diff line change
Expand Up @@ -341,12 +341,12 @@ export const createFormInternals = (options: IFormCreatorOptions = {}) => {

function disableUnmountClearStates(pattern: FormPathPattern = '*') {
const path = FormPath.parse(pattern)
env.clearStatesPatterns[path.toString()] = true
env.clearStatesPatterns[path.toString()] = false
}

function enableUnmountClearStates(pattern: FormPathPattern = '*') {
const path = FormPath.parse(pattern)
env.clearStatesPatterns[path.toString()] = false
env.clearStatesPatterns[path.toString()] = true
}

function supportUnmountClearStates(path: FormPathPattern) {
Expand Down

0 comments on commit 754a55f

Please sign in to comment.