Skip to content

Commit

Permalink
Rwender slot
Browse files Browse the repository at this point in the history
  • Loading branch information
harsh-mn-yral committed Nov 17, 2023
1 parent cb1135b commit 86df3f3
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions packages/experiments/src/routes/test/Virtu.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export let index: number
let show = index < 3
const checkToShow = debounce(750, async (activeIndex: number) => {
const checkToShow = debounce(200, async (activeIndex: number) => {
await tick()
setTimeout(() => {
show = index > activeIndex - 4 && index < activeIndex + 4
Expand All @@ -18,6 +18,4 @@ $: checkToShow(activeIndex)
$: console.log(index, show)
</script>

{#if show}
<slot {show} />
{/if}
<slot {show} />

0 comments on commit 86df3f3

Please sign in to comment.