We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 66ffeb6 commit 46bdd46Copy full SHA for 46bdd46
packages/next/src/__builtins__/mapStatus.ts
@@ -1,11 +1,11 @@
1
-import { GeneralField } from '@formily/core'
+import { Field } from '@formily/core'
2
3
-export const mapStatus = (props: any, field: GeneralField) => {
+export const mapStatus = (props: any, field: Field) => {
4
const takeStatus = () => {
5
if (!field) return
6
- if (field['loading'] || field['validating']) return 'loading'
7
- if (field['invalid']) return 'error'
8
- if (field['warnings']?.length) return 'warning'
+ if (field.loading || field.validating) return 'loading'
+ if (field.selfErrors?.length) return 'error'
+ if (field.selfWarnings?.length) return 'warning'
9
return field.decoratorProps?.feedbackStatus
10
}
11
const takeState = (state: string) => {
0 commit comments