aboutsummaryrefslogtreecommitdiffstats
path: root/src/@types/mobx-form.types.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/@types/mobx-form.types.ts')
-rw-r--r--src/@types/mobx-form.types.ts11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/@types/mobx-form.types.ts b/src/@types/mobx-form.types.ts
index 7caddc9e4..c9932c053 100644
--- a/src/@types/mobx-form.types.ts
+++ b/src/@types/mobx-form.types.ts
@@ -26,15 +26,22 @@ export interface Field extends Partial<Listeners> {
26 id?: string; 26 id?: string;
27 type?: string; 27 type?: string;
28 name?: string; 28 name?: string;
29 value: string; 29 value: string | string[];
30 label?: string; 30 label?: string;
31 placeholder?: string; 31 placeholder?: string;
32 disabled?: boolean; 32 disabled?: boolean;
33 error?: GlobalError | string; 33 error?: GlobalError | string;
34 options?: SelectOptions[];
35}
36
37export interface SelectOptions {
38 disabled?: boolean;
39 label?: string;
40 value?: string;
34} 41}
35 42
36export interface Listeners { 43export interface Listeners {
37 onChange?: ChangeEventHandler<HTMLInputElement>; 44 onChange?: ChangeEventHandler<HTMLInputElement | HTMLSelectElement>;
38 onBlur?: FocusEventHandler<HTMLElement>; 45 onBlur?: FocusEventHandler<HTMLElement>;
39 onFocus?: FocusEventHandler<HTMLElement>; 46 onFocus?: FocusEventHandler<HTMLElement>;
40} 47}