fix tabs selected behavior change from svelte 5

This commit is contained in:
Ruben Fiszel
2025-04-04 19:50:17 +00:00
parent b47c15165f
commit efacda7453
@@ -28,7 +28,16 @@
const selectedStore = writable(selected)
$: $selectedStore && dispatch('selected', $selectedStore)
$: $selectedStore && onSelectedStoreChange()
let initial = true
function onSelectedStoreChange() {
if (initial) {
initial = false
return
}
dispatch('selected', $selectedStore)
}
$: hashValues = values ? values.map((x) => '#' + x) : undefined
setContext<TabsContext>('Tabs', {