<${props.Select}
isOptionDisabled=${option => option.mf_input_option_status === 'disabled'}
className=${"mf-input mf-input-multiselect " + ( validation.errors['mf-multi-select'] ? 'mf-invalid' : '' )}
classNamePrefix="mf_multiselect"
value=${parent.getValue("mf-multi-select") && [{"label":"Megaworld Hotels","value":"value-1","_id":"27d7dfe","mf_input_option_status":"","mf_input_option_selected":""},{"label":"Condominiums","value":"value-4","_id":"7689a1a","mf_input_option_status":"","mf_input_option_selected":""},{"label":"Residential Lots","value":"value-2","_id":"cb40e87","mf_input_option_status":"","mf_input_option_selected":""},{"label":"Commercial Lots","value":"value-3","_id":"8ace0cc","mf_input_option_status":"","mf_input_option_selected":""}].filter(item => {
if(parent.state.formData['mf-multi-select'] && parent.state.formData['mf-multi-select'].indexOf(item.value) != -1 ){
return item;
}
})}
name='mf-multi-select'
placeholder="${ parent.decodeEntities(`Select Property`) } "
options=${[{"label":"Megaworld Hotels","value":"value-1","_id":"27d7dfe","mf_input_option_status":"","mf_input_option_selected":""},{"label":"Condominiums","value":"value-4","_id":"7689a1a","mf_input_option_status":"","mf_input_option_selected":""},{"label":"Residential Lots","value":"value-2","_id":"cb40e87","mf_input_option_status":"","mf_input_option_selected":""},{"label":"Commercial Lots","value":"value-3","_id":"8ace0cc","mf_input_option_status":"","mf_input_option_selected":""}]}
onChange=${(el) => {
setValue("mf-multi-select", '');
if(el != null){
setValue("mf-multi-select", el, true);
}
parent.multiSelectChange(el, 'mf-multi-select');
}}
ref=${() => {
register({ name: "mf-multi-select" }, parent.activateValidation({"message":"This field is required.","minLength":1,"maxLength":"","type":"none","required":false}));
if(parent.state?.submitted !== true){
if ( parent.getValue("mf-multi-select") === '' && false ) {
parent.setValue( 'mf-multi-select', '[]');
parent.multiSelectChange('[]', 'mf-multi-select');
}
}
}}
isMulti
/>
<${validation.ErrorMessage}
errors=${validation.errors}
name="mf-multi-select"
as=${html``}
/>