Skip to content

Commit

Permalink
Merge pull request #50173 from nextcloud/backport/50152/stable29
Browse files Browse the repository at this point in the history
[stable29] fix(dashboard): don't initially load items of hidden api widgets
  • Loading branch information
susnux authored Jan 17, 2025
2 parents 525e865 + 5034485 commit 7499fa9
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
6 changes: 4 additions & 2 deletions apps/dashboard/src/DashboardApp.vue
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ export default {
const apiWidgetIdsToFetch = Object
.values(this.apiWidgets)
.filter(widget => this.isApiWidgetV2(widget.id))
.filter(widget => this.isApiWidgetV2(widget.id) && this.layout.includes(widget.id))
.map(widget => widget.id)
await Promise.all(apiWidgetIdsToFetch.map(id => this.fetchApiWidgetItems([id], true)))
Expand Down Expand Up @@ -377,9 +377,11 @@ export default {
const index = this.layout.indexOf(panel.id)
if (!currentValue && index > -1) {
this.layout.splice(index, 1)
} else {
this.layout.push(panel.id)
if (this.isApiWidgetV2(panel.id)) {
this.fetchApiWidgetItems([panel.id], true)
}
}
Vue.set(this.panels[panel.id], 'mounted', false)
this.saveLayout()
Expand Down
4 changes: 2 additions & 2 deletions dist/dashboard-main.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/dashboard-main.js.map

Large diffs are not rendered by default.

0 comments on commit 7499fa9

Please sign in to comment.