Skip to content

Commit

Permalink
Adjustments regarding broader/narrower details in setSelected method
Browse files Browse the repository at this point in the history
  • Loading branch information
stefandesu committed Aug 31, 2021
1 parent 1899afa commit 5106791
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/mixins/global.js
Original file line number Diff line number Diff line change
Expand Up @@ -156,14 +156,21 @@ export default {
let broaderPromises = []
this.adjustConcept(concept)
for (let broader of concept.broader.filter(concept => concept != null)) {
this.loadConcepts([broader], { scheme })
broaderPromises.push(this.loadConcepts([broader], { scheme }))
}
Promise.all(broaderPromises).then(() => {
// TODO: Is adjustment necessary?
this.adjustConcept(concept)
this.$set(concept, "__BROADERLOADED__", true)
})
}
// Asynchronously load information about its narrower concepts
if (concept && concept.narrower) {
this.loadConcepts(concept.narrower.filter(c => c != null)).catch(() => { }).then(() => {
// TODO: Is adjustment necessary?
this.adjustConcept(concept)
})
}
// TODO
// Only select if loadingId matches on the same side
if (loadingId == this.$store.state.selected.loadingId[isLeft]) {
Expand Down

0 comments on commit 5106791

Please sign in to comment.