You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the options, there are the three attributes "selected", "label" and "value".
Is it possible to add custom attributes to the options ("optionTemplate")?
I need a custom textarea and a custom checkbox for each option.
Thanks!
The text was updated successfully, but these errors were encountered:
Not out of the box. I suggest you make a custom control plugin that will enhance the options with the required additional fields, you will need to handle saving the inputs into the field and loading the formData
While cleaning up some documentation I discovered that onAddOption callback allows you to add additional fields to the option list. The feature isn't well documented so I'm writing tests for it now and will add to the documentation.
onAddOption: (optionTemplate,optionInfo)=>{console.log('here i am');console.error('here i am');optionTemplate.label=`Option ${optionInfo.index+1}`;optionTemplate.value=`option-${optionInfo.index+1}`;optionTemplate.customText=`custom-text-${optionInfo.index+1}`;optionTemplate.customBool=false;returnoptionTemplate;},
In the options, there are the three attributes "selected", "label" and "value".
Is it possible to add custom attributes to the options ("optionTemplate")?
I need a custom textarea and a custom checkbox for each option.
Thanks!
The text was updated successfully, but these errors were encountered: