Topic: How to show selected icon in mdb-select
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 answered 2 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.
Answered
- User: Pro
- Premium support: No
- Technology: Angular
- MDB Version: 8.3.0
- Device: All
- Browser: All
- OS: All
- Provided sample code: No
- Provided link: No
Arkadiusz Idzikowski staff commented 2 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 2 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.