Select with additional information only visible on opened se


Topic: Select with additional information only visible on opened select

dtrunk90 pro premium asked 2 months ago

Given the following example: How can I avoid appending the "additional info" text to the selected option (closed selectbox):

<div class="md-form">
  <mdb-select-2 placeholder="Choose your option" label="Example label">
    <mdb-select-option *ngFor="let option of options" [value]="option.value">{{ option.label }}
<small class="text-muted">additional info</small></mdb-select-option>
  </mdb-select-2>
</div>

enter image description here


Arkadiusz Idzikowski staff commented 2 months ago

It looks like a bug and I'm afraid there is no easy workaround for now, but we will take a closer look at that and let you know what we found.


dtrunk90 pro premium commented 1 months ago

Looking at the changelog for v10 it seems to be fixed now:

Select 2 - added new label input for mdb-select-option component. If the input value is available, it will be displayed in the select input after option selection.

I will test it asap after upgrading to v10. Thx!


Arkadiusz Idzikowski staff commented 1 months ago

In v10 you can use the label input to specify a value that will be displayed in the select input. In this case, the value from the input will be used instead of option text content.


dtrunk90 pro premium commented 1 months ago

Yes, just tested and it works now. Thx again!


Please insert min. 20 characters.
Status

Resolved

Specification of the issue
  • User: Pro
  • Premium support: Yes
  • Technology: Angular
  • MDB Version: 9.4.0
  • Device: Desktop
  • Browser: Firefox
  • OS: Linux Ubuntu
  • Provided sample code: No
  • Provided link: No