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

how to change the text of the select ionic cancel button #1963

Closed
Luancarlos opened this issue Dec 5, 2019 · 3 comments · Fixed by #1979
Closed

how to change the text of the select ionic cancel button #1963

Luancarlos opened this issue Dec 5, 2019 · 3 comments · Fixed by #1979
Labels

Comments

@Luancarlos
Copy link

Question

A clear and concise description of what the question is.

@Luancarlos Luancarlos changed the title how to change the text of the cancel button? how to change the text of the select ionic cancel button Dec 5, 2019
@Devqon
Copy link
Contributor

Devqon commented Dec 5, 2019

Looking at the code this isn't supported (yet). You can do either:

  • Fork the repo, create a pull request with the change (awesome, contribution!)
  • Create a custom template for the ion-select which contains the

You need to include the cancelText (and if you're already on it, the okText) in the template:

    <ion-select
      [cancelText]="to.cancelText || 'Cancel'"
      [okText]="to.okText || 'OK'"
      [formControl]="formControl"
      [ionFormlyAttributes]="field"
      [multiple]="to.multiple"
      [interface]="to.interface">
      <ion-select-option *ngFor="let option of to.options | formlySelectOptions:field | async" [value]="option.value">
        {{ option.label }}
      </ion-select-option>
    </ion-select>

@aitboudad
Copy link
Member

This issue has been fixed and released as part of v5.5.7 release.

@Devqon thanks for the hint 👍!!

@Luancarlos
Copy link
Author

thank you very much, you are very good

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging a pull request may close this issue.

3 participants