Skip to content

Commit

Permalink
[Collapse] Use local transition modifier to work around SvelteKit pag…
Browse files Browse the repository at this point in the history
…e change issue. sveltejs/kit#628
  • Loading branch information
techniq committed Mar 22, 2022
1 parent c3327c0 commit 4d949ab
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/lib/components/Collapse.svelte
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
<script lang="ts">
import clsx from 'clsx';
import { createEventDispatcher } from 'svelte';
import { slide } from 'svelte/transition';
import clsx from 'clsx';
import { mdiChevronDown } from '@mdi/js';
import Icon from './Icon.svelte';
Expand Down Expand Up @@ -60,7 +59,7 @@
</button>

{#if active}
<div transition:slide>
<div transition:slide|local>
<slot {active} />
</div>
{/if}
Expand Down

1 comment on commit 4d949ab

@vercel
Copy link

@vercel vercel bot commented on 4d949ab Mar 22, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.