Paulo Henrique Capuzzo pro asked 1 year ago

I'm using select which, select is not getting data from fetch, ajax or axios. I used this code. Sometimes it gets the data.

const singleSelect = document.querySelector('#singleSelection');
const singleSelectInstance = mdb.Select.getInstance(singleSelect);

What do I do?

Thank you so much,


Grzegorz Bujański staff answered 1 year ago

How do you get data? Can you create a working snippet in which the issue you are writing about will be visible?

Select itself does not provide a method for retrieving data from the API. You yourself need to handle the data fetching and displaying it on the page,and then initialize select. The code you sent only performs select initialization and sets value, there is no code responsible for getting data from API.

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

  • ForumUser: Pro
  • Premium support: No
  • Technology: MDB Standard
  • MDB Version: MDB5 5.0.0
  • Device: Macbook
  • Browser: All
  • OS: Mac
  • Provided sample code: No
  • Provided link: No