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

fix: close the More options menu when an option has been selected #2004

Merged
merged 2 commits into from
Sep 29, 2021

Conversation

jenniferarnesen
Copy link
Collaborator

Fixes: https://jira.dhis2.org/browse/DHIS2-11773

Backport (forwardPort?) of #1983

The More options button and menu is complicated because there are 2 copies (of both the button and the menu) - one for small screen and one for not-small screen. So in order to toggle that menu, the small/not-small flag was being provided to the toggle function, but that flag was only available if clicking on the More button. When selecting an option in the menu, the menu should always be closed, so the solution was to trigger close on both menus.

This code should probably be refactored for a cleaner solution than having 2 copies of the menu.

…7] (#1983)

Fixes: https://jira.dhis2.org/browse/DHIS2-11773

The More options button and menu is complicated because there are 2 copies (of both the button and the menu) - one for small screen and one for not-small screen. So in order to toggle that menu, the small/not-small flag was being provided to the toggle function, but that flag was only available if clicking on the More button. When selecting an option in the menu, the menu should always be closed, so the solution was to trigger close on both menus.

This code should probably be refactored for a cleaner solution than having 2 copies of the menu.
@dhis2-bot
Copy link
Contributor

dhis2-bot commented Sep 29, 2021

🚀 Deployed on https://pr-2004--dhis2-dashboard.netlify.app

@dhis2-bot dhis2-bot temporarily deployed to netlify September 29, 2021 10:03 Inactive
@dhis2-bot dhis2-bot temporarily deployed to netlify September 29, 2021 10:15 Inactive
@jenniferarnesen jenniferarnesen merged commit 6593bd4 into master Sep 29, 2021
@jenniferarnesen jenniferarnesen deleted the fix/close-more-menu branch September 29, 2021 12:06
dhis2-bot added a commit that referenced this pull request Oct 1, 2021
## [31.19.14](v31.19.13...v31.19.14) (2021-10-01)

### Bug Fixes

* **deps:** bump platform deps to clear sensitive caches and more ([#1999](#1999)) ([45a4ca2](45a4ca2))
* close the More options menu when an option has been selected [v37] ([#1983](#1983)) ([#2004](#2004)) ([6593bd4](6593bd4))
* **translations:** sync translations from transifex (master) ([#2000](#2000)) ([b893bd7](b893bd7))
@dhis2-bot
Copy link
Contributor

🎉 This PR is included in version 31.19.14 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants