How to show selected icon in mdb-select


Topic: How to show selected icon in mdb-select

PavlaQ pro asked 3 years ago

Hello, I have problem with mdb-select after choose select option

I have object

this.iconsSelect = [
  {value: 1, label: '', icon: '/path/icon.png'},
]

And I expect after choose option show selected icon. In this moment i have empty label without selected icon. How can I do this?


Arkadiusz Idzikowski staff commented 3 years ago

It work correctly on the example from our documentation, so I think it is a problem with the path to the icon image.

Are there any errors in console? Please make sure you added correct path to icon.png.


PavlaQ pro commented 3 years ago

I've good path to icon. I see this on option list after open select but if I choose anyone mdb-select shows only label without icon.


Arkadiusz Idzikowski staff answered 3 years ago

Sorry, I had to misunderstand your question. It's not possible to display icon in the select input (outside the dropdown). This is how our component is designed.


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 Angular
  • MDB Version: 8.3.0
  • Device: All
  • Browser: All
  • OS: All
  • Provided sample code: No
  • Provided link: No