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: when loading a dashboard set the loaded flag after the fetch so state doesn't toggle back and forth #1975

Merged
merged 2 commits into from
Sep 14, 2021

Conversation

jenniferarnesen
Copy link
Collaborator

loaded was set to true before firing the fetch dashboards request. When that request failed due to the cache being hacked and deleted, then catch set loaded back to false. The result was that loaded kept toggling between true and false.

In addition, after discussion with Kai, it is not necessary to listen to recordingState to determine if loading is necessary. Note that removal of that recordingState doesn't impact any behavior.

infinite.loading.fixed.mov

@dhis2-bot
Copy link
Contributor

dhis2-bot commented Sep 14, 2021

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

@jenniferarnesen jenniferarnesen enabled auto-merge (squash) September 14, 2021 14:49
@jenniferarnesen jenniferarnesen merged commit c9b4ff7 into master Sep 14, 2021
@jenniferarnesen jenniferarnesen deleted the fix/infinite-dashboards-requests branch September 14, 2021 15:24
dhis2-bot added a commit that referenced this pull request Sep 15, 2021
## [31.19.11](v31.19.10...v31.19.11) (2021-09-15)

### Bug Fixes

* **translations:** sync translations from transifex (master) ([#1968](#1968)) ([66070be](66070be))
* analytics@20.4.7, data-visualizer-plugin@38.0.13 ([#1981](#1981)) ([30b25fb](30b25fb))
* in small screen make the "editing not possible" message the same whether in create or edit mode ([#1972](#1972)) ([1b9a193](1b9a193))
* remove other action buttons when in edit mode print preview ([#1974](#1974)) ([e9a54d1](e9a54d1))
* when loading a dashboard set the loaded flag after the fetch so state doesn't toggle back and forth  ([#1975](#1975)) ([c9b4ff7](c9b4ff7))
@dhis2-bot
Copy link
Contributor

🎉 This PR is included in version 31.19.11 🎉

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