Topic: mdb_autocomplete dynamic data

Neal Creapeau pro asked 5 years ago

What is the proper way to call a function to dynamically create 'state' array? I currently have $('.mdb-autocomplete').on('keyup', function() { var term = $(this).val(); $.get('get_city.php?term='+term, function(data){ var obj = JSON.parse(data); $('.mdb-autocomplete').mdb_autocomplete({ data: }); })//end get }) which does generate a list but acts very strange... can type letters in input but nothing happens. if you hit backspace the autocomplete ul shows and starts working. previous browser form data input shows over the top of autocomplete ui I have the returned data printing in console and it returns the correct data every keyup, the autocomplete js is just not working.

Adrian Sawicki free answered 5 years ago

Hello Neal Creapeau, Thanks for good explanation of problem which you found. We will look into this matter. As for now, it should work correctly with 'mousedown' event. Regards, Adrian

Please insert min. 20 characters.


Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.


Specification of the issue

  • User: Pro
  • Premium support: No
  • Technology: General Bootstrap questions
  • MDB Version: -
  • Device: -
  • Browser: -
  • OS: -
  • Provided sample code: No
  • Provided link: No