Ionic-framework: FR: Include a 'Clear' option on the ion-select

Created on 14 Jul 2017  Â·  5Comments  Â·  Source: ionic-team/ionic-framework

Ionic version: (check one with "x")
[ ] 1.x (For Ionic 1.x issues, please use https://github.com/ionic-team/ionic-v1)
[ ] 2.x
[x] 3.x

I'm submitting a ... (check one with "x")
[ ] bug report
[x] feature request
[ ] support request => Please do not submit support requests here, use one of these channels: https://forum.ionicframework.com/ or http://ionicworldwide.herokuapp.com/

Current behavior:
At the moment, when you select an item on an ion-select you are locked into that answer and cannot _clear_ it.

Expected behavior:
It would be great to have an additional 'Clear' button which deselects and resets the select box - this then clears the answer(s) (unticks them) and reverts back to the placeholder text.

There's an argument to say whether this should trigger an ionSelect() with null or undefined or include an ionClear() output. I expect the latter would offer greater flexibility.

As with current buttons, you should be able to set i18n strings - so a setting like clearText would be great.

Steps to reproduce:
N/A

Related code:

<ion-select [showClear]="true" [clearText]="'Reset'">
  <ion-option value="1">1</ion-option>
  <ion-option value="2">2</ion-option>
  <ion-option value="3">3</ion-option>
</ion-select>

Other information:
N/A

Ionic info: (run ionic info from a terminal/cmd prompt and paste output below):
N/A

Most helpful comment

Hi –

The link above to the feature request is broken.

Is this FR still being considered? I'd like to +1 it and monitor progress.

Sorry – I looked for the FR on the main Ionic repo, but couldn't find it.

All 5 comments

Hello! Thanks for the feature request. I'm going to move this issue over to our internal list of feature requests for evaluation. We are continually prioritizing all requests that we receive with outstanding issues. We are extremely grateful for your feedback, but it may not always be our next priority. I'll copy the issue back to this repository when we have begun implementation. Thanks!

This issue was moved to ionic-team/ionic-feature-requests#275

Thanks @jgw96. :)

Hi –

The link above to the feature request is broken.

Is this FR still being considered? I'd like to +1 it and monitor progress.

Sorry – I looked for the FR on the main Ionic repo, but couldn't find it.

Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

BilelKrichen picture BilelKrichen  Â·  3Comments

MrBokeh picture MrBokeh  Â·  3Comments

manucorporat picture manucorporat  Â·  3Comments

RobFerguson picture RobFerguson  Â·  3Comments

alexbainbridge picture alexbainbridge  Â·  3Comments