jquery ui selectmenu autofill

120 views Asked by At

I have selectboxes transformed into dropdown menu via jquery ui selectmenu. My problem is that when I autofill data dropdown menu does not autofills. only when I press each selectbox when menu drops down, selector selects the right option.

But I need this to be done automatically. How can I achive this ?

1

There are 1 answers

8
Abdelrahman Gobarah On BEST ANSWER

after initialize select menus call

$('select').change();
$('select').selectmenu("refresh");

Work around to detect browser autofill is to setTimeout then trigger refresh or change event

setTimeout(function() {
    $('select').change();
    $('select').selectmenu("refresh");
}, 500);