mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-22 21:48:42 +08:00
docs(overlay): onDidDismiss
This commit is contained in:
@ -164,16 +164,32 @@ export class Picker implements OverlayInterface {
|
||||
if (this.durationTimeout) {
|
||||
clearTimeout(this.durationTimeout);
|
||||
}
|
||||
return dismiss(this, data, role, 'pickerLeave', iosLeaveAnimation, iosLeaveAnimation, undefined);
|
||||
return dismiss(this, data, role, 'pickerLeave', iosLeaveAnimation, iosLeaveAnimation);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a promise that resolves when the picker did dismiss. It also accepts a callback
|
||||
* that is called in the same circustances.
|
||||
*
|
||||
* ```
|
||||
* const {data, role} = await picker.onDidDismiss();
|
||||
* ```
|
||||
*/
|
||||
@Method()
|
||||
onDidDismiss(callback: (data?: any, role?: string) => void): Promise<OverlayEventDetail> {
|
||||
onDidDismiss(callback?: (detail: OverlayEventDetail) => void): Promise<OverlayEventDetail> {
|
||||
return eventMethod(this.el, 'ionPickerDidDismiss', callback);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a promise that resolves when the picker will dismiss. It also accepts a callback
|
||||
* that is called in the same circustances.
|
||||
*
|
||||
* ```
|
||||
* const {data, role} = await picker.onWillDismiss();
|
||||
* ```
|
||||
*/
|
||||
@Method()
|
||||
onWillDismiss(callback: (data?: any, role?: string) => void): Promise<OverlayEventDetail> {
|
||||
onWillDismiss(callback?: (detail: OverlayEventDetail) => void): Promise<OverlayEventDetail> {
|
||||
return eventMethod(this.el, 'ionPickerWillDismiss', callback);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user