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: avoid re-rendering an item when adding the same again (DHIS2-17016) #2935

Merged
merged 28 commits into from
Apr 26, 2024
Merged
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
0b0c7cf
fix(translations): sync translations from transifex (dev)
dhis2-bot Nov 26, 2023
6a22f08
chore: analytics (#2856)
janhenrikoverland Dec 14, 2023
9d83c09
chore(deps): bump @adobe/css-tools from 4.3.1 to 4.3.2
dependabot[bot] Dec 14, 2023
db5128a
fix(translations): sync translations from transifex (dev)
dhis2-bot Dec 17, 2023
678edc2
Merge branch 'dev' into dependabot/npm_and_yarn/adobe/css-tools-4.3.2
jenniferarnesen Jan 22, 2024
fbcf30c
Merge pull request #2836 from dhis2/dependabot/npm_and_yarn/adobe/css…
jenniferarnesen Jan 23, 2024
4d43b23
chore(deps): bump browserify-sign from 4.2.1 to 4.2.2 (#2807)
dependabot[bot] Jan 23, 2024
3518e64
chore(deps): bump crypto-js from 4.1.1 to 4.2.0 (#2806)
dependabot[bot] Jan 23, 2024
166186b
chore(deps): bump get-func-name from 2.0.0 to 2.0.2 (#2748)
dependabot[bot] Jan 23, 2024
34bf16e
chore: use the repo default branch for dependabot (#2887)
jenniferarnesen Jan 23, 2024
252a0cf
chore: include patch packages in cache-key (#2855)
jenniferarnesen Jan 23, 2024
b99c5ac
chore(deps): bump react-redux from 7.2.4 to 7.2.9 (#2893)
dependabot[bot] Jan 23, 2024
56fcaa4
chore(deps): bump moment from 2.29.4 to 2.30.1 (#2892)
dependabot[bot] Jan 23, 2024
06e0eb3
chore(deps): bump @dhis2/d2-i18n from 1.1.1 to 1.1.3 (#2896)
dependabot[bot] Jan 23, 2024
201d673
chore(deps): bump @babel/traverse from 7.18.13 to 7.23.2 (#2796)
dependabot[bot] Jan 23, 2024
7a12d98
chore(deps): bump @dhis2/app-runtime from 3.9.4 to 3.10.2 (#2890)
dependabot[bot] Jan 24, 2024
c2798d0
chore: include release notes in slackbot message (#2911)
jenniferarnesen Feb 14, 2024
c3110d8
fix(translations): sync translations from transifex (dev) (#2920)
dhis2-bot Feb 28, 2024
3550cfa
fix: use interpretations component from Analytics (DHIS2-15441) (#2430)
jenniferarnesen Mar 4, 2024
0ee6322
feat: support outlier table plugin (DHIS2-16751) (#2912)
edoardo Mar 5, 2024
ee1fc94
chore: run the release step on both master and dev branches (#2929)
jenniferarnesen Mar 6, 2024
44cd380
fix(translations): sync translations from transifex (dev)
dhis2-bot Mar 10, 2024
602c670
chore: update analytics dependency (#2934)
edoardo Mar 13, 2024
d4b3f4d
fix: avoid re-rendering an item when adding the same again (DHIS2-17016)
edoardo Mar 12, 2024
9396429
Merge branch 'dev' into fix/item-copies-rendering-issue
jenniferarnesen Mar 20, 2024
622679a
Merge branch 'dev' into fix/item-copies-rendering-issue
edoardo Apr 8, 2024
c9a5810
Merge branch 'dev' into fix/item-copies-rendering-issue
edoardo Apr 25, 2024
620e469
Merge branch 'dev' into fix/item-copies-rendering-issue
jenniferarnesen Apr 25, 2024
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
10 changes: 7 additions & 3 deletions src/components/Item/VisualizationItem/Item.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,13 @@ class Item extends Component {
}

async componentDidMount() {
this.props.setVisualization(
await apiFetchVisualization(this.props.item)
)
// Avoid refetching the visualization already in the Redux store
// when the same dashboard item is added again.
// This also solves a flashing of all the "duplicated" dashboard items.
!this.props.visualization.id &&
this.props.setVisualization(
await apiFetchVisualization(this.props.item)
)

try {
if (
Expand Down
Loading