Skip to content

Commit

Permalink
fix: ts type (#3888)
Browse files Browse the repository at this point in the history
* fix: ts type

* fix: ts type
  • Loading branch information
hchlq authored Jul 4, 2023
1 parent b9ab509 commit 2e59dc5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions packages/core/src/models/Graph.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@ export class Graph {
} else {
const field = form.fields[address]
if (field) {
field.setState(state as any)
field.setState(state)
} else {
createField(address, state).setState(state as any)
createField(address, state).setState(state)
}
}
})
Expand Down
5 changes: 3 additions & 2 deletions packages/core/src/shared/internals.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ import {
IFormFeedback,
LifeCycleTypes,
FieldMatchPattern,
FieldFeedbackTypes,
} from '../types'
import {
isArrayField,
Expand Down Expand Up @@ -312,13 +313,13 @@ export const validateToFeedbacks = async (
})

batch(() => {
each(results, (messages, type) => {
each(results, (messages, type: FieldFeedbackTypes) => {
field.setFeedback({
triggerType,
type,
code: pascalCase(`validate-${type}`),
messages: messages,
} as any)
})
})
})
return results
Expand Down

0 comments on commit 2e59dc5

Please sign in to comment.