I’m facing an issue with ion-select of Ionic 8. I’m using the popover interface and my long labels aren’t wrapped as you can see on this picture:
Here’s my code:
<ion-select [formControlName]="fControlName"
[interface]="getInterface()"
[multiple]="multiple"
(ionChange)="emitSelectChange($event)"
class="ion-text-wrap"
label-placement="stacked">
<div class="ion-text-wrap workaround-multiline-select" slot="label">{{ labelKey | translate }}</div>
<ion-select-option *ngFor="let option of optionKeys" [value]="option.value">
<div *ngFor="let key of option.keys">{{ key | translate }} </div>
</ion-select-option>
</ion-select>
I tried to add the css class “ion-text-wrap” on the div but without success.
Here’s the generated html code :
I tried to override css classes in my global.scss without success :
.sc-ion-select-popover-ios { // override by children
white-space: normal !important;
}
:host(.sc-ion-select-popover-ios) .label-text-wrapper { // not working
text-overflow: inherit !important;
white-space: normal !important;
overflow: visible !important;
}
.label-text-wrapper { // not working
white-space: normal !important;
}
Do you have any idea how I can achieve this please ?