Skip to content

Commit

Permalink
Fix map hydration issue
Browse files Browse the repository at this point in the history
  • Loading branch information
jlpereira committed Aug 8, 2023
1 parent add9d68 commit 1669ff3
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 1669ff3

Please sign in to comment.