Description
If put some components inside an array component, the script like enable
will not work.
Maybe need to specify both the array index(or just default to current?) and name?
Demo code:
fields: { component: 'array', label: 'array label', name: 'array_history', layout: 'vertical', arrayType: 'arrayOfObject', fields: [ { component: 'radio-group', label: 'Do you?', name: 'do_you', options: [ { value: 'yes', label: 'Yes', }, { value: 'no', label: 'No', }, ], row: false, script: "if (do_you === 'yes') { enable(comment) } else { disable(comment) }", 'react-antd': { optionType: 'default', inline: true, }, }, { component: 'input-text', label: 'Comments', name: 'comment', disabled: true, 'react-antd': { fullWidth: true, }, }, ], }
Error: [LetsForm] Error in script: Error: Field "undefined" doesn't exist in the form