Metro-UI-CSS icon indicating copy to clipboard operation
Metro-UI-CSS copied to clipboard

dynamic auto complete

Open mohash25 opened this issue 1 year ago • 1 comments

my problem is after each API call when new data arrives and i update the autocomplete list new suggestions wont refresh. is there a way after updating autocomplete list new information showing up?

mohash25 avatar May 06 '23 09:05 mohash25

  $(document).on("change", "#FIELD", function(e) {
    e.preventDefault();

    $.get("/ajax.url.php", {
       value: $("#FIELD").val()
      }).then(
         function(response) {
           Metro.getPlugin("#NEW_FIELD", "input").setAutocompleteList(response);
          },
        function(xhr){
          console.log(xhr.status, xhr.statusText);
       });

    });

Work for me!

TorakikiSan avatar Feb 09 '24 07:02 TorakikiSan