formaat-design / reshaped

Community repository for storing examples, reporting issues and tracking roadmap
https://reshaped.so
120 stars 4 forks source link

[Bug] Controlled TabList animation jumps #308

Closed mareksed closed 2 months ago

mareksed commented 3 months ago

Describe the bug I am trying to use/abuse TabList, using to highlight selected category as I scroll through list of categories. As you scroll the activeCategory gets updated, but visually there is a jump that looks like a bug.

To Reproduce https://codesandbox.io/p/sandbox/switch-bug-forked-3lm8f2?file=%2Fsrc%2FApp.js%3A12%2C26

Expected behavior TabList is animated smoothly.

Screenshots

https://github.com/user-attachments/assets/fe655e9a-38d9-461f-9e6a-5c98ab1ff473

Environment (please complete the following information):

Additional context Not sure if this is even a use case for this component :), but would be cool to be able to have a controlled list with this behaviour.

blvdmitry commented 2 months ago

Fixed, going to release a patch with the changes alongside a few other minor improvements later this week 🙏

https://github.com/user-attachments/assets/f080ec8f-3a8d-4712-a803-4d2811b7c7e0

mareksed commented 2 months ago

ohh man so cool you picked it up thank you 🙇