Select2 integration
$('#camunda-ppPrice_list_operation-select').select2({
selectOnClose: true
});
Detecting change event
$(document.body).on('change', '#camunda-ppPrice_list_operation-select', function(evt) {
setTimeout(()=> {
customSet(element, {pricelist: evt.target.value });
}, 1000);
})
Changes not firing in the change event ?
So as you describing this issue, it seems to be related to select2
and not within our toolkit, right? Can you maybe describe your use case a bit better. A CodeSandbox would be very appreciated.
Select2 is working, because customSet event is called , but the drawshape method is not called, bpmn-js not triggering in programmatic dropdown changes
For example if i change the selectbox using code it does not call customSet method , the issue is exactly related to the below mentioned issue.
How to trigger select option event,
Please share a CodeSandbox. Otherwise we can’t help you.
Hey everyone, I hope everyone is doing good and keeping safe in these challenging times. If this is still an issue for anyone try the below
$("#yourListID").select2().val(json.data.members).trigger("change");
//Here the *json.data.members* is just a list of *[]*
//It contains only IDs - used as Value in the select element
Cheers