Ionic version:
[x] 4.x
[x] 5.x
Describe the Feature Request
It would be helpful if it were possible to use ion-picker
as an interface for ion-select
Describe Preferred Solution
You could add a 4th value: (picker) for 'interface' property of ion-select.
ion-select-option
could work as options for one-column picker.
If the picker options were in the template it would be easier apply Angular and custom pipes. At the same time, we could name the control to include into a form.
Related Code
This is an extract from one of my projects, changing the 'interface' property value:
<form #f="ngForm" (ngSubmit)="onSubmit(f)">
<ion-select name="newScheduled" interface="picker" cancelText="Cancelar" okText="Aceptar">
<ion-select-option *ngFor="maint of maintenances" [value]="maint">{{ maint.start | date: 'shortDate' }} {{ maint.start | date: 'shortTime'}} - {{ maint.end | shortTime }}</ion-select-option>
<ion-select-option>Other schedule</ion-select-option>
</ion-select>
</form>
I would like it to look like this
Additional Context
I find it hard to imagine how we could pass options for two or more columns, but it would be a great addition too.
for now - why don't you fake it, use an ion-item, stick an icon with the down arrow in the end slot.
Then on click, show your picker interface programmatically.
Set the ion-item label to whatever your choice is.
Most helpful comment
for now - why don't you fake it, use an ion-item, stick an icon with the down arrow in the end slot.
Then on click, show your picker interface programmatically.
Set the ion-item label to whatever your choice is.