-
Notifications
You must be signed in to change notification settings - Fork 609
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(action-sheet): Add cancelable parameter #2285
base: main
Are you sure you want to change the base?
Conversation
Only is applied if no cancel option is provided. References: https://outsystemsrd.atlassian.net/browse/RMET-3576
Released dev build of action-sheet with dev version: 7.0.0-dev-2285-20250113T110659.0 |
@@ -17,21 +17,26 @@ public class ActionSheetPlugin: CAPPlugin, CAPBridgedPlugin { | |||
@objc func showActions(_ call: CAPPluginCall) { | |||
let title = call.options["title"] as? String | |||
let message = call.options["message"] as? String | |||
let cancelable = call.options["cancelable"] as? Bool ?? false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe there's a getBool
with a default value within the CAPPluginCall
, maybe we can use it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't there a getString
as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But those @OS-pedrogustavobilro didn't change, so I'm not sure if they're worth the change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not super important, but I think if we change one we should change the others to keep the way we access CAPPluginCall's
parameters consistent.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done in 99443ae
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:
ActionSheetButtonStyle
property that other platforms do not - explained in the doc updates that are also in this PR.Fixes #2154