How to setValue for select for dynamic option population on


Topic: How to setValue for select for dynamic option population on open.mdb.select?

yunior23 pro asked 2 weeks ago

*Expected behavior*I made MDB Select to load options only on open.mdb.select, it calls server to provide all the options.Everything works, except if in our edit page would like to setValue for selected.

Question how set value for edit form?We get from server id which represent id for setting value.

How to set value if options list is not created yet?Can someone give some example or explain?

Thank you.


Kamila Pieńkowska staff answered 2 weeks ago

We do not support server-side use of the select component. However, you can do that easily with autocomplete: https://mdbootstrap.com/docs/standard/forms/autocomplete/#section-async-search

You cannot set a value for a select that has no options.


yunior23 pro commented 2 weeks ago

Thank you for answer. I figure out way around and it works for me without changing original code. Just calling correct methods out from MDB Select instance.


Please insert min. 20 characters.

FREE CONSULTATION

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

Status

Answered

Specification of the issue
  • User: Pro
  • Premium support: No
  • Technology: MDB Standard
  • MDB Version: MDB5 8.2.0
  • Device: PC
  • Browser: Google Chrome
  • OS: Windows
  • Provided sample code: No
  • Provided link: No