formaat-design / reshaped

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

Dropdown content should remain fixed when scrolling from GNB #192

Closed irrationnelle closed 8 months ago

irrationnelle commented 8 months ago

Describe the bug

Hello! First, I'd like to thank you for creating such a wonderful library; it's been incredibly useful.

However, I have one issue I'd like to address. When I declare a Dropdown Trigger on the GNB and click it to display the Dropdown Content, the content moves with the scroll.

The Dropdown Content should remain fixed to the GNB's Dropdown Trigger regardless of scrolling.

To Reproduce

Expected behavior

The Dropdown Content remains fixed when scrolling.

Environment (please complete the following information):

Screenshots

https://github.com/formaat-design/reshaped/assets/10165823/202861a0-db95-487e-b699-6c7274736c1c

blvdmitry commented 8 months ago

Thanks for reporting, we've recently fixed it for scrollable areas but haven't got to managing it for the fixed elements. Going to include it for the next release

blvdmitry commented 8 months ago

Got it working, shouldn't require changing anything in the code on your side as it should detect the closest element with a fixed position, same as we do with scrollable areas Going to release a patch in a moment

https://github.com/formaat-design/reshaped/assets/887379/11416aa9-ce58-46c6-95ce-127c35d7bb76

blvdmitry commented 8 months ago

It's live now in 2.5.6

irrationnelle commented 8 months ago

It works great, thanks for the quick fix!