Skip to content

Commit

Permalink
Fix an issue where top concept details sometimes weren't loaded
Browse files Browse the repository at this point in the history
  • Loading branch information
stefandesu committed Nov 28, 2023
1 parent fdd64b1 commit 4fb84c7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 5 additions & 0 deletions src/components/ConceptListWrapper.vue
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,11 @@ export default {
},
},
},
watch: {
concepts() {
this.loadConceptsInView()
},
},
created() {
this.loadConceptsInView = _.debounce(this._loadConceptsInView, 300)
},
Expand Down
5 changes: 3 additions & 2 deletions src/mixins/global.js
Original file line number Diff line number Diff line change
Expand Up @@ -158,10 +158,11 @@ export default {
// Load narrower and ancestor concepts (in background)
// Note: We're waiting until after concept details are loaded because sometimes narrower/ancestors are already loaded there.
loadNarrower(concept).then(narrower => {
loadConcepts(narrower)
loadConcepts(narrower, { scheme })
})
loadAncestors(concept).then(ancestors => {
// Load its ancestors' narrower concepts
// Load its ancestors' details and narrower concepts
loadConcepts(ancestors, { scheme })
ancestors.filter(Boolean).forEach(ancestor => loadNarrower(ancestor))
})

Expand Down

0 comments on commit 4fb84c7

Please sign in to comment.