${ parent.decodeEntities(`Courses`) }
<${props.Select}
isOptionDisabled=${option => option.mf_input_option_status === 'disabled'}
className=${"mf-input mf-input-multiselect " + ( validation.errors['mf-courses'] ? 'mf-invalid' : '' )}
classNamePrefix="mf_multiselect"
value=${parent.getValue("mf-courses") && [{"label":"Engineering","value":"Engineering","_id":"24772a2","mf_input_option_status":"","mf_input_option_selected":""},{"label":"MBBS","value":"MBBS","_id":"3d83127","mf_input_option_status":"","mf_input_option_selected":""},{"label":"Arts & Science","value":"Arts & Science","_id":"2104ce7","mf_input_option_status":"","mf_input_option_selected":""},{"_id":"9a28cf0","label":"Diploma & ITI","value":"Diploma & ITI","mf_input_option_status":"","mf_input_option_selected":""},{"_id":"a9f5dee","label":"Agriculture","value":"Agriculture","mf_input_option_status":"","mf_input_option_selected":""},{"_id":"9b85c2f","label":"Marine","value":"Marine","mf_input_option_status":"","mf_input_option_selected":""}].filter(item => {
if(parent.state.formData['mf-courses'] && parent.state.formData['mf-courses'].indexOf(item.value) != -1 ){
return item;
}
})}
name='mf-courses'
placeholder="${ parent.decodeEntities(`Multi Select`) } "
options=${[{"label":"Engineering","value":"Engineering","_id":"24772a2","mf_input_option_status":"","mf_input_option_selected":""},{"label":"MBBS","value":"MBBS","_id":"3d83127","mf_input_option_status":"","mf_input_option_selected":""},{"label":"Arts & Science","value":"Arts & Science","_id":"2104ce7","mf_input_option_status":"","mf_input_option_selected":""},{"_id":"9a28cf0","label":"Diploma & ITI","value":"Diploma & ITI","mf_input_option_status":"","mf_input_option_selected":""},{"_id":"a9f5dee","label":"Agriculture","value":"Agriculture","mf_input_option_status":"","mf_input_option_selected":""},{"_id":"9b85c2f","label":"Marine","value":"Marine","mf_input_option_status":"","mf_input_option_selected":""}]}
onChange=${(el) => {
setValue("mf-courses", '');
if(el != null){
setValue("mf-courses", el, true);
}
parent.multiSelectChange(el, 'mf-courses');
}}
ref=${() => {
register({ name: "mf-courses" }, parent.activateValidation({"message":"This field is required.","minLength":1,"maxLength":"","type":"none","required":false}));
if(parent.state?.submitted !== true){
if ( parent.getValue("mf-courses") === '' && false ) {
parent.setValue( 'mf-courses', '[]');
parent.multiSelectChange('[]', 'mf-courses');
}
}
}}
isMulti
/>
<${validation.ErrorMessage}
errors=${validation.errors}
name="mf-courses"
as=${html` `}
/>