diff options
Diffstat (limited to 'src/@types/mobx-form.types.ts')
-rw-r--r-- | src/@types/mobx-form.types.ts | 19 |
1 files changed, 6 insertions, 13 deletions
diff --git a/src/@types/mobx-form.types.ts b/src/@types/mobx-form.types.ts index c9932c053..2a984d3a6 100644 --- a/src/@types/mobx-form.types.ts +++ b/src/@types/mobx-form.types.ts | |||
@@ -9,29 +9,22 @@ export interface FormFieldOptions { | |||
9 | 9 | ||
10 | export interface FormFields { | 10 | export interface FormFields { |
11 | fields: { | 11 | fields: { |
12 | [key: string]: { | 12 | [key: string]: Field; |
13 | label?: string; | ||
14 | placeholder?: string; | ||
15 | options?: FormFieldOptions[]; | ||
16 | value?: string | boolean | number | null; | ||
17 | default?: string | boolean | number | null; | ||
18 | type?: string; // todo specifiy probably | ||
19 | disabled?: boolean; | ||
20 | validators?: any; // Not sure yet. | ||
21 | }; | ||
22 | }; | 13 | }; |
23 | } | 14 | } |
24 | 15 | ||
25 | export interface Field extends Partial<Listeners> { | 16 | export interface Field extends Listeners { |
26 | id?: string; | 17 | id?: string; |
27 | type?: string; | 18 | type?: string; // todo specifiy probably |
28 | name?: string; | 19 | name?: string; |
29 | value: string | string[]; | 20 | value?: any; |
30 | label?: string; | 21 | label?: string; |
31 | placeholder?: string; | 22 | placeholder?: string; |
32 | disabled?: boolean; | 23 | disabled?: boolean; |
33 | error?: GlobalError | string; | 24 | error?: GlobalError | string; |
34 | options?: SelectOptions[]; | 25 | options?: SelectOptions[]; |
26 | default?: string | boolean | number | null; | ||
27 | validators?: any; // Not sure yet. | ||
35 | } | 28 | } |
36 | 29 | ||
37 | export interface SelectOptions { | 30 | export interface SelectOptions { |