Quantcast
Channel: Ionic Framework - Ionic Forum
Viewing all articles
Browse latest Browse all 48983

Right align ion-select with popover

$
0
0

Right now I have an ion-select element on my page that I would like to have right aligned with a popover.

This is the code for my ion-select:

<ion-item lines="none">
    <ion-select (ionChange)="selectLang($event)" [(ngModel)]="language" interface="popover" [disabled]="loading">
         <ion-select-option value="en_US">{{ 'segments.en_US' | translate }}</ion-select-option>
         <ion-select-option value="es_MX">{{ 'segments.es_MX' | translate }}</ion-select-option>
    </ion-select>
</ion-item>

And the css for the html:

ion-select {
    width: 100%;
    text-align: right;
}

This is how it is displayed in the app:

Screen Shot 2022-01-31 at 12.54.19 PM

When activated:

Screen Shot 2022-01-31 at 12.55.53 PM

And the popover:

Screen Shot 2022-01-31 at 12.54.52 PM

Can I get the activated backdrop to just cover the select and not the entire width of the ion-select, and how can I get the popover to be right aligned?

Appreciate any guidance.

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 48983

Trending Articles