mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-20 04:14:21 +08:00
feat(modal): add canDismiss property to manage modal dismissing (#24928)
resolves #22297 Co-authored-by: EinfachHans <EinfachHans@users.noreply.github.com>
This commit is contained in:
10
core/src/components.d.ts
vendored
10
core/src/components.d.ts
vendored
@ -1509,6 +1509,10 @@ export namespace Components {
|
||||
* The breakpoints to use when creating a sheet modal. Each value in the array must be a decimal between 0 and 1 where 0 indicates the modal is fully closed and 1 indicates the modal is fully open. Values are relative to the height of the modal, not the height of the screen. One of the values in this array must be the value of the `initialBreakpoint` property. For example: [0, .25, .5, 1]
|
||||
*/
|
||||
"breakpoints"?: number[];
|
||||
/**
|
||||
* Determines whether or not a modal can dismiss when calling the `dismiss` method. If the value is `true` or the value's function returns `true`, the modal will close when trying to dismiss. If the value is `false` or the value's function returns `false`, the modal will not close when trying to dismiss.
|
||||
*/
|
||||
"canDismiss"?: undefined | boolean | (() => Promise<boolean>);
|
||||
/**
|
||||
* The component to display inside of the modal.
|
||||
*/
|
||||
@ -1584,6 +1588,7 @@ export namespace Components {
|
||||
"showBackdrop": boolean;
|
||||
/**
|
||||
* If `true`, the modal can be swiped to dismiss. Only applies in iOS mode.
|
||||
* @deprecated - To prevent modals from dismissing, use canDismiss instead.
|
||||
*/
|
||||
"swipeToClose": boolean;
|
||||
/**
|
||||
@ -5222,6 +5227,10 @@ declare namespace LocalJSX {
|
||||
* The breakpoints to use when creating a sheet modal. Each value in the array must be a decimal between 0 and 1 where 0 indicates the modal is fully closed and 1 indicates the modal is fully open. Values are relative to the height of the modal, not the height of the screen. One of the values in this array must be the value of the `initialBreakpoint` property. For example: [0, .25, .5, 1]
|
||||
*/
|
||||
"breakpoints"?: number[];
|
||||
/**
|
||||
* Determines whether or not a modal can dismiss when calling the `dismiss` method. If the value is `true` or the value's function returns `true`, the modal will close when trying to dismiss. If the value is `false` or the value's function returns `false`, the modal will not close when trying to dismiss.
|
||||
*/
|
||||
"canDismiss"?: undefined | boolean | (() => Promise<boolean>);
|
||||
/**
|
||||
* The component to display inside of the modal.
|
||||
*/
|
||||
@ -5311,6 +5320,7 @@ declare namespace LocalJSX {
|
||||
"showBackdrop"?: boolean;
|
||||
/**
|
||||
* If `true`, the modal can be swiped to dismiss. Only applies in iOS mode.
|
||||
* @deprecated - To prevent modals from dismissing, use canDismiss instead.
|
||||
*/
|
||||
"swipeToClose"?: boolean;
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user