Form Builder Component

With this component you can make form ui easily

<FormBuilder formKey={'builder-from'} initModel={initModel} fieldList={fieldList}/>

Examples

const fieldList: IField[] = [
{label: 'Name', id: 'name', component: 'TextField'},
{
label: 'Assign', id: 'assigned_to', component: 'AutoCompleteTextField', model: {
deriveModel: {
type: 'erp',
options: {method: EXEC_QUERY_METHOD, body: {name: 'd9cdbfabe5'}},
path: 'message'
}
}
},
{
label: 'frop',
id: 'text',
component: 'Dropdown',
model: [{key: 'Business Partner', text: 'Business Partner'}, {key: 'Lead', text: 'Lead'}],
placeHolder: 'hi'
}
]
const initModel = {
name: ["Dinesh", validator.string().required('Pleas input first name')],
age: [12, validator.number().typeError("Should be a number")],
assigned_to: [6, validator.string()]
}
<FormBuilder formKey={'builder-from'} initModel={initModel} fieldList={fieldList}/>