emilkowalski / vaul

A drawer component for React.
https://vaul.emilkowal.ski
MIT License
6.45k stars 215 forks source link

v1.0.0 issue with second-first snap drag animation #469

Open eugentimofeev opened 1 month ago

eugentimofeev commented 1 month ago

https://github.com/user-attachments/assets/ecab441b-6008-4615-a7bf-6f2fd472632d

Example - https://stackblitz.com/edit/vitejs-vite-urrh9c?file=src%2Fapp.tsx

The transform property does not change when dragging from the second snapPoint to the first snapPoint with modal=true & dismissible=false

I also noticed that when dismissible=true transform changes correctly

aparent-emgs commented 2 weeks ago

I'm observing the same issue when I set dismissible to false on the Drawer.

Also just a note, in @eugentimofeev's example modal is set to false, not true, and in my case I can observe the undesirable behavior whether modal is set to true or false, so I think it's irrelevant to this issue. I observe the issue whenever the drawer is set with more than 2 snap points and dismissible is set to false.