jqueryjquery-uiautofilljquery-ui-selectmenu

jquery ui selectmenu autofill


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 ?


Solution

  • 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);