Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add 'picker' interface for ion-select component #20317

Open
zamora95 opened this issue Jan 28, 2020 · 1 comment
Open

feat: Add 'picker' interface for ion-select component #20317

zamora95 opened this issue Jan 28, 2020 · 1 comment
Labels
package: core @ionic/core package type: feature request a new feature, enhancement, or improvement

Comments

@zamora95
Copy link

zamora95 commented Jan 28, 2020

Feature Request

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
image

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.

@ionitron-bot ionitron-bot bot added the triage label Jan 28, 2020
@liamdebeasi liamdebeasi added package: core @ionic/core package type: feature request a new feature, enhancement, or improvement labels Jan 28, 2020
@ionitron-bot ionitron-bot bot removed the triage label Jan 28, 2020
@daveshirman
Copy link

daveshirman commented Jan 28, 2020

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package: core @ionic/core package type: feature request a new feature, enhancement, or improvement
Projects
None yet
Development

No branches or pull requests

3 participants