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

Method callButtonHandler

core/src/components/alert/alert.tsx:527–541  ·  view source on GitHub ↗
(button: AlertButton | undefined, data?: any)

Source from the content-addressed store, hash-verified

525 }
526
527 private async callButtonHandler(button: AlertButton | undefined, data?: any) {
528 if (button?.handler) {
529 // a handler has been provided, execute it
530 // pass the handler the values from the inputs
531 const returnData = await safeCall(button.handler, data);
532 if (returnData === false) {
533 // if the return value of the handler is false then do not dismiss
534 return false;
535 }
536 if (typeof returnData === 'object') {
537 return returnData;
538 }
539 }
540 return {};
541 }
542
543 private getValues(): any {
544 if (this.processedInputs.length === 0) {

Callers 2

buttonClickMethod · 0.95
AlertClass · 0.95

Calls 1

safeCallFunction · 0.90

Tested by

no test coverage detected