Refactor
parent
d01c40c55b
commit
94845433d8
|
@ -213,7 +213,7 @@
|
|||
"optional": false,
|
||||
"readonly": false,
|
||||
"type": "boolean",
|
||||
"default": "",
|
||||
"default": "false",
|
||||
"description": "Whether the form field has been touched."
|
||||
},
|
||||
{
|
||||
|
@ -221,7 +221,7 @@
|
|||
"optional": false,
|
||||
"readonly": false,
|
||||
"type": "boolean",
|
||||
"default": "",
|
||||
"default": "false",
|
||||
"description": "Whether the form field has been modified."
|
||||
},
|
||||
{
|
||||
|
@ -229,7 +229,7 @@
|
|||
"optional": false,
|
||||
"readonly": false,
|
||||
"type": "boolean",
|
||||
"default": "",
|
||||
"default": "true",
|
||||
"description": "Whether the form field has not been modified."
|
||||
},
|
||||
{
|
||||
|
@ -237,7 +237,7 @@
|
|||
"optional": false,
|
||||
"readonly": false,
|
||||
"type": "boolean",
|
||||
"default": "",
|
||||
"default": "true",
|
||||
"description": "Whether the form field is valid."
|
||||
},
|
||||
{
|
||||
|
@ -245,7 +245,7 @@
|
|||
"optional": false,
|
||||
"readonly": false,
|
||||
"type": "boolean",
|
||||
"default": "",
|
||||
"default": "false",
|
||||
"description": "Whether the form field is invalid."
|
||||
},
|
||||
{
|
||||
|
@ -261,7 +261,7 @@
|
|||
"optional": false,
|
||||
"readonly": false,
|
||||
"type": "any[]",
|
||||
"default": "",
|
||||
"default": "[]",
|
||||
"description": "All error messages of the form field."
|
||||
}
|
||||
],
|
||||
|
|
|
@ -126,22 +126,27 @@ export interface FormFieldState {
|
|||
value: any;
|
||||
/**
|
||||
* Whether the form field has been touched.
|
||||
* @defaultValue false
|
||||
*/
|
||||
touched: boolean;
|
||||
/**
|
||||
* Whether the form field has been modified.
|
||||
* @defaultValue false
|
||||
*/
|
||||
dirty: boolean;
|
||||
/**
|
||||
* Whether the form field has not been modified.
|
||||
* @defaultValue true
|
||||
*/
|
||||
pristine: boolean;
|
||||
/**
|
||||
* Whether the form field is valid.
|
||||
* @defaultValue true
|
||||
*/
|
||||
valid: boolean;
|
||||
/**
|
||||
* Whether the form field is invalid.
|
||||
* @defaultValue false
|
||||
*/
|
||||
invalid: boolean;
|
||||
/**
|
||||
|
@ -150,6 +155,7 @@ export interface FormFieldState {
|
|||
error: any;
|
||||
/**
|
||||
* All error messages of the form field.
|
||||
* @defaultValue []
|
||||
*/
|
||||
errors: any[];
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue