(button: AlertButton)
| 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) { |
no test coverage detected