Skip to content

feat(select): set modal interface cancel button to "Ok" by default#31197

Open
thetaPC wants to merge 4 commits into
major-9.0from
select-modal-cancel
Open

feat(select): set modal interface cancel button to "Ok" by default#31197
thetaPC wants to merge 4 commits into
major-9.0from
select-modal-cancel

Conversation

@thetaPC

@thetaPC thetaPC commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

Issue number: N/A


What is the current behavior?

The select modal commits each option the moment it's tapped, so there's nothing to cancel. A "Cancel" button is misleading because it implies the selection can be undone, when in fact the change has already taken effect. The button should use wording that reflects that it simply closes the modal.

What is the new behavior?

  • Changed the cancel text to be more appropriate.
  • Updated snapshots

Does this introduce a breaking change?

  • Yes
  • No

Other information

Preview

  • Select: basic

@vercel

vercel Bot commented Jun 5, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
ionic-framework Ready Ready Preview, Comment Jun 22, 2026 6:26pm

Request Review

@github-actions github-actions Bot added the package: core @ionic/core package label Jun 5, 2026
@thetaPC thetaPC marked this pull request as ready for review June 5, 2026 23:22
@thetaPC thetaPC requested a review from a team as a code owner June 5, 2026 23:22
@thetaPC thetaPC requested a review from brandyscarney June 5, 2026 23:22
Comment thread core/src/components/select/select.tsx Outdated
/**
* The text to display on the cancel button.
* Defaults to `'Cancel'` for the `alert` and `action-sheet`
* interfaces, and `'Okay'` for the `modal` interface.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* interfaces, and `'Okay'` for the `modal` interface.
* interfaces, and `'Ok'` for the `modal` interface.

Comment thread core/src/components/select/select.tsx Outdated
/**
* Resolves the cancel button text, falling back to the
* per-interface default when `cancelText` is not set:
* `'Okay'` for the `modal` interface, `'Cancel'` otherwise.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* `'Okay'` for the `modal` interface, `'Cancel'` otherwise.
* `'Ok'` for the `modal` interface, `'Cancel'` otherwise.

@brandyscarney brandyscarney changed the title fix(select): set modal interface cancel button to "Okay" by default fix(select): set modal interface cancel button to "Ok" by default Jun 8, 2026
@thetaPC thetaPC force-pushed the select-modal-cancel branch from d78fb0e to 1461dcf Compare June 22, 2026 18:15
@github-actions github-actions Bot added package: angular @ionic/angular package package: vue @ionic/vue package package: react @ionic/react package labels Jun 22, 2026
@thetaPC thetaPC changed the base branch from main to major-9.0 June 22, 2026 18:16
@github-actions github-actions Bot removed package: angular @ionic/angular package package: vue @ionic/vue package package: react @ionic/react package labels Jun 22, 2026
@thetaPC thetaPC changed the title fix(select): set modal interface cancel button to "Ok" by default feat(select): set modal interface cancel button to "Ok" by default Jun 22, 2026
@thetaPC thetaPC requested a review from brandyscarney June 22, 2026 21:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

package: core @ionic/core package

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants