Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(feat) O3-3112: Add form collapse toggle to the esm-form-engine-app #1814

Merged
merged 5 commits into from
Apr 29, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
refactor: remove redundant add lister
  • Loading branch information
usamaidrsk committed Apr 26, 2024
commit e056ca8c1869b01f88a1ecce75909734a6073f18
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,6 @@ const FormCollapseToggle = () => {
};
}, []);

useEffect(() => {
window.addEventListener('openmrs:form-collapse-toggle', null);

return () => {
window.removeEventListener('openmrs:form-collapse-toggle', null);
};
}, []);

const handleOnToggle = (value: boolean) => {
usamaidrsk marked this conversation as resolved.
Show resolved Hide resolved
const FormCollapseToggleEvent = new CustomEvent('openmrs:form-collapse-toggle', { detail: { value } });
window.dispatchEvent(FormCollapseToggleEvent);
Expand Down
Loading