From 302d595f7c289387e53a0ef7df4d574ed4e25d70 Mon Sep 17 00:00:00 2001 From: muhamedsalih-tw <104364298+muhamedsalih-tw@users.noreply.github.com> Date: Wed, 2 Nov 2022 06:31:36 +0530 Subject: Transform to TS and refactored components w.r.t deletion if duplicated Input component (#729) --- src/@types/mobx-form.types.ts | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) (limited to 'src/@types') 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 { export interface FormFields { fields: { - [key: string]: { - label?: string; - placeholder?: string; - options?: FormFieldOptions[]; - value?: string | boolean | number | null; - default?: string | boolean | number | null; - type?: string; // todo specifiy probably - disabled?: boolean; - validators?: any; // Not sure yet. - }; + [key: string]: Field; }; } -export interface Field extends Partial { +export interface Field extends Listeners { id?: string; - type?: string; + type?: string; // todo specifiy probably name?: string; - value: string | string[]; + value?: any; label?: string; placeholder?: string; disabled?: boolean; error?: GlobalError | string; options?: SelectOptions[]; + default?: string | boolean | number | null; + validators?: any; // Not sure yet. } export interface SelectOptions { -- cgit v1.2.3-70-g09d2