fix : Modal component not firing event (#10016)

* fix : modal not firing event

* fix : modal fireevent

* chore : version bump
This commit is contained in:
Kiran Ashok 2024-06-11 11:01:14 +05:30 committed by GitHub
parent c3d9b29b68
commit f4193a1e32
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 5 additions and 4 deletions

View file

@ -1 +1 @@
2.61.1
2.61.2

View file

@ -1 +1 @@
2.61.1
2.61.2

View file

@ -87,7 +87,7 @@ export const Modal = function Modal({
return;
}
const canShowModal = exposedVariables.show ?? false;
fireEvent(canShowModal ? 'onOpen' : 'onClose');
fireEvent(!canShowModal && 'onClose');
setShowModal(exposedVariables.show ?? false);
const inputRef = document?.getElementsByClassName('tj-text-input-widget')?.[0];
inputRef?.blur();
@ -223,6 +223,7 @@ export const Modal = function Modal({
event.stopPropagation();
setShowModal(true);
setExposedVariable('show', true);
fireEvent('onOpen');
}}
data-cy={`${dataCy}-launch-button`}
>

View file

@ -1 +1 @@
2.61.1
2.61.2