From 44e7fc3381253bfd73417bfa78fcbc425fe35c45 Mon Sep 17 00:00:00 2001 From: David Wheatley Date: Tue, 23 Nov 2021 22:54:26 +0000 Subject: [PATCH] fix: incorrect typings for Modal `hide()` method (#3180) * fix: incorrect typings for `hide()` * fix: swap to arrow calling of hide handler --- framework/core/js/src/common/components/Modal.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/framework/core/js/src/common/components/Modal.tsx b/framework/core/js/src/common/components/Modal.tsx index 0a7ed743d..24594f5a7 100644 --- a/framework/core/js/src/common/components/Modal.tsx +++ b/framework/core/js/src/common/components/Modal.tsx @@ -93,7 +93,7 @@ export default abstract class Modal {Button.component({ icon: 'fas fa-times', - onclick: this.hide.bind(this), + onclick: () => this.hide(), className: 'Button Button--icon Button--link', 'aria-label': app.translator.trans('core.lib.modal.close'), })} @@ -148,14 +148,14 @@ export default abstract class Modal