Skip to content

Commit

Permalink
fix: Correctly show current selected panel on city update
Browse files Browse the repository at this point in the history
  • Loading branch information
artonge committed Aug 31, 2024
1 parent b7ccc78 commit 35fbe64
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/components/WeatherForecasts.vue
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ const flicking: Ref<Flicking | null> = ref(null)
watch(() => props.city, () => _fetchForecast(props.city.latitude, props.city.longitude))
onMounted(async () => await _fetchForecast(props.city.latitude, props.city.longitude))
watch(() => forecast.value, () => currentPanelIndex.value = 0)
async function _fetchForecast(latitude: number, longitude: number) {
forecast.value = null
Expand Down

0 comments on commit 35fbe64

Please sign in to comment.