huntabyte / shadcn-svelte

shadcn/ui, but for Svelte. ✨
https://shadcn-svelte.com
MIT License
4.79k stars 300 forks source link

bug: Drawer prop `open` skips close animation #837

Open MentalGear opened 6 months ago

MentalGear commented 6 months ago

Describe the bug

When triggering the Drawer by code using the open prop, and closing it again with open={false}, there is no slide down animation as triggered normally with <Drawer.Close>Cancel</Drawer.Close>.

Reproduction

Use the open prop on Drawer to close the drawer.

Logs

No response

System Info

System:
    OS: macOS 10.15.7
    CPU: (6) x64 Intel(R) Core(TM) i5-8500 CPU @ 3.00GHz
    Memory: 412.88 MB / 40.00 GB
    Shell: 3.2.57 - /bin/bash
  Binaries:
    Node: 20.11.0 - /usr/local/bin/node
    Yarn: 1.22.17 - /usr/local/bin/yarn
    npm: 7.10.0 - ~/node_modules/.bin/npm
  Browsers:
    Chrome: 122.0.6261.94
    Firefox: 123.0
    Safari: 15.6.1
  npmPackages:
    @sveltejs/kit: ^2.5.0 => 2.5.0 
    bits-ui: ^0.18.1 => 0.18.1 
    formsnap: ^0.5.0 => 0.5.0 
    mode-watcher: ^0.2.1 => 0.2.1 
    svelte: 5.0.0-next.55 => 5.0.0-next.55 
    sveltekit-superforms: ^2.5.0 => 2.5.0 
    vaul-svelte: ^0.2.3 => 0.2.3

Severity

annoyance

huntabyte commented 6 months ago

Related https://github.com/huntabyte/vaul-svelte/issues/52