Ionic select remove ok button and on tap over option value straight away

Hi,

When a user has to select a valid value, he/she has to select the value
then press OK.
Could we remove the OK button and consider that if the user selects a
value, then it is confirming the new value straight away? It will remove
one tap.

Thanks

i need it too! Help us!

add an id in your button or any things and remove it in your angular function , example :

in html :

<button #but (click)="delete(but)" >OK</button>

in angular :

 delete(Button: Element) {
    Button.remove();
  }

Please do not take the advice in the previous post.

To OP: use either the action-sheet or popover interfaces documented here:

The action-sheet and popover interfaces do not have an OK button, clicking on any of the options will automatically close the overlay and select that value.

1 Like

For some reason the popover interface isn’t working for me (I still have the OK, Cancel buttons):

	<ion-select interface="popover" [(ngModel)]="selectedPeriodId" (ionChange)="onPeriodChange()">
		<ion-option *ngFor="let period of periods" [value]="period.id">{{period.name}}</ion-option>
	</ion-select>
1 Like

what about interface=“action-sheet” it is worked for me