Skip to content

Commit

Permalink
Merge pull request #113 from SpeciesFileGroup/development
Browse files Browse the repository at this point in the history
Fix map hydration issue
  • Loading branch information
José Luis Pereira authored and GitHub committed Aug 8, 2023
2 parents f600294 + 1669ff3 commit 2a927e2
Showing 1 changed file with 8 additions and 13 deletions.
21 changes: 8 additions & 13 deletions src/modules/otus/components/Panel/PanelMap/PanelMap.vue
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
</template>

<script setup>
import { ref, watch } from 'vue'
import { ref, onMounted } from 'vue'
import { useOtuStore } from '@/modules/otus/store/store'
import CachedMap from './CachedMap.vue'
import OtuSearch from '../../Search/OtuSearch.vue'
Expand Down Expand Up @@ -108,17 +108,12 @@ const LEGEND = {
}
}
watch(
() => props.otuId,
async (newId, oldId) => {
if (newId === oldId) return
isLoading.value = true
onMounted(() => {
isLoading.value = true
store.loadDistribution({
otuId: props.otuId,
rankString: props.taxon.rank_string
})
},
{ immediate: true }
)
store.loadDistribution({
otuId: props.otuId,
rankString: props.taxon.rank_string
})
})
</script>

0 comments on commit 2a927e2

Please sign in to comment.