Closed prajayan76 closed 5 years ago
var fieldsHidden = true ... ... ...
onValueChange(){ const formValues = this.formGenerator.getValues(); formValues.selectname['id'] !== '1' ? fieldsHidden = false : fieldsHidden = true }
const fields = [
{ type: 'select', name: 'Organization', multiple: false, required: true, label: 'OrganizationType', labelKey: 'name', primaryKey: 'id', objectType: true, options: [ // required { id: 1, name: 'Health',
}, { id: 2, name: 'Finance', } ], defaultValue: [{ id: 1, name: 'Health', }],
},
{ type: 'text', name: CompanyName', label: 'Company Name', hidden: fieldsHidden, }, ]
its not working
You can't right now. The lib does not update the fields. I will do a PR for this once the owner of the project @bietkul answers my email.
var fieldsHidden = true ... ... ...
onValueChange(){ const formValues = this.formGenerator.getValues(); formValues.selectname['id'] !== '1' ? fieldsHidden = false : fieldsHidden = true }
const fields = [
{ type: 'select', name: 'Organization', multiple: false, required: true, label: 'OrganizationType', labelKey: 'name', primaryKey: 'id', objectType: true, options: [ // required { id: 1, name: 'Health',
},
{ type: 'text', name: CompanyName', label: 'Company Name', hidden: fieldsHidden, }, ]
its not working