Struggling to populate my jQuery Chosen dropdown field with AJAX data using VueJS. Unfortunately, when trying to update the values, the Chosen dropdown does not reflect the changes.
I've experimented with different approaches, including manually triggering
$('.cs-select').trigger("chosen:updated");
upon receiving the AJAX response. However, it seems that this method is ineffective due to VueJS requiring a few moments to parse the results for all dropdowns (I have around 20 dropdowns with identical values on a single page).
For example, adding the city Amsterdam does not appear in the JavaScript-enabled dropdown even after everything has loaded: http://jsfiddle.net/qfy6s9Lj/106/
Is there a simple solution to this issue? I believe resorting to setTimeout()
is not the ideal approach.