Object as mdb-option [value]


Topic: Object as mdb-option [value]

bitmads pro premium asked 2 years ago

Expected behavior

I would like to add objects (not strings) as [value] parameter of mdb-option, BUT show other some property of the selected object in the autocomplete field.

I'm looking for something like displayWith in angular-material autocomplete:https://material.angular.io/components/autocomplete/overview

Actual behavior

When I use object as mdb-option value, I'm getting [object Object] in the completer input field.

I tried (select) and override the input, but sometimes the internal select function runs slower and finally I've got [object Object] back.

Resources (screenshots, code snippets etc.)

I wanted to insert a code but this thing can't format it :(


Arkadiusz Idzikowski staff answered 2 years ago

Unfortunately we don't have any feature similar to displayWith in current version. I agree that this is must have for this component. I already created task with high priority for that.


bitmads pro premium answered 2 years ago

I'm a premium user and nobody picks up my support request? What's going on?


Please insert min. 20 characters.
Status

Answered

Specification of the issue
  • User: Pro
  • Premium support: Yes
  • Technology: Angular
  • MDB Version: 8.1.1
  • Device: PC
  • Browser: Chrome
  • OS: Windows 10
  • Provided sample code: No
  • Provided link: Yes