Skip to content

feat(action-sheet): Add cancelable input option and and canceled output parameter#2285

Merged
OS-pedrogustavobilro merged 18 commits intomainfrom
feat/RMET-3576/action-sheet-cancelable
Feb 27, 2026
Merged

feat(action-sheet): Add cancelable input option and and canceled output parameter#2285
OS-pedrogustavobilro merged 18 commits intomainfrom
feat/RMET-3576/action-sheet-cancelable

Conversation

@OS-pedrogustavobilro
Copy link
Copy Markdown
Contributor

@OS-pedrogustavobilro OS-pedrogustavobilro commented Dec 17, 2024

Add parameter to allow action-sheet to be cancelable (clicking outside the sheet, and using the system back button on Android), and in case it is canceled, return it in the result.

Notes:

  • The cancelable parameter is not configurable for iOS - the sheet is always cancelable. I've tried to work around this but wasn't able to get it not both not cancel and return a result to the plugin at the same time across different iOS versions (most notably iOS 26). Alternatively we could use a custom UIController, but it wouldn't guarantee to look the same as it does + since the issue was manually for Android, I don't think we need to go into that level of detail.
  • For this to work with PWAs, it requires feat: Add onCanceled event for action sheet pwa-elements#138 - version 3.4.0 of pwa-elements

To test, use this branch from capacitor-test-app, that has the latest dev build of action-sheet plugin - https://github.com/ionic-team/capacitor-testapp/tree/feat/test-new-action-sheet-feature

Fixes #2154

@github-actions
Copy link
Copy Markdown

github-actions bot commented Dec 17, 2024

Released dev build of action-sheet with dev version: 8.0.2-dev-2285-20260225T164758.0

@OS-pedrogustavobilro OS-pedrogustavobilro requested review from a team and alexgerardojacinto and removed request for IT-MikeS and OS-martacarlos February 20, 2026 16:28
@OS-pedrogustavobilro
Copy link
Copy Markdown
Contributor Author

Hey @alexgerardojacinto @jcesarmobile I had to make some adjustments to the iOS implementation, due to changes in iOS 26 (and also fixing some stuff that was broken in the old implementation), also updated the PR description, feel free to review whenever you can 🙏

@OS-pedrogustavobilro OS-pedrogustavobilro requested a review from a team February 25, 2026 09:41
@OS-pedrogustavobilro OS-pedrogustavobilro changed the title feat(action-sheet): Add cancelable parameter feat(action-sheet): Add cancelable input option and and canceled output parameter Feb 25, 2026
@theproducer theproducer self-assigned this Feb 27, 2026
@OS-pedrogustavobilro OS-pedrogustavobilro merged commit 251c62c into main Feb 27, 2026
9 checks passed
@OS-pedrogustavobilro OS-pedrogustavobilro deleted the feat/RMET-3576/action-sheet-cancelable branch February 27, 2026 14:55
OS-pedrogustavobilro added a commit to ionic-team/capacitor-testapp that referenced this pull request Apr 1, 2026
* chore: update pwa-elements to latest version

* feat: Add action sheet screen to test new feature

* tmp: Use dev build of action-sheet plugin

References:
- ionic-team/capacitor-plugins#2285
- https://outsystemsrd.atlassian.net/browse/RMET-3576

* chore: point to stable action-sheet version

* chore: fix lint issues

* chore: Use capacitor 8.2.0

* fix: Remove iOS check for cancelable toggle

We may look into introducing cancelable for iOS, so this helps test it better

* chore: update action-sheet dependency to latest

* chore: fix merge conflict
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: @capacitor/action-sheet - allow click-outside and back-button on ActionSheet on Android

4 participants