MCPcopy Index your code
hub / github.com/ionic-team/ionic-framework / buttonClick

Method buttonClick

core/src/components/alert/alert.tsx:514–525  ·  view source on GitHub ↗
(button: AlertButton)

Source from the content-addressed store, hash-verified

512 }
513
514 private async buttonClick(button: AlertButton) {
515 const role = button.role;
516 const values = this.getValues();
517 if (isCancel(role)) {
518 return this.dismiss({ values }, role);
519 }
520 const returnData = await this.callButtonHandler(button, values);
521 if (returnData !== false) {
522 return this.dismiss({ values, ...returnData }, button.role);
523 }
524 return false;
525 }
526
527 private async callButtonHandler(button: AlertButton | undefined, data?: any) {
528 if (button?.handler) {

Callers 1

renderAlertButtonsMethod · 0.95

Calls 4

getValuesMethod · 0.95
dismissMethod · 0.95
callButtonHandlerMethod · 0.95
isCancelFunction · 0.90

Tested by

no test coverage detected