formaat-design / reshaped

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

Dropdown menu is not relative to parent #169

Closed Madhavkabra closed 10 months ago

Madhavkabra commented 10 months ago

Menu for Dropdown component has position set relative to viewport and not parent element. This causes problems when the dropdown is in a scrollable component which is scrolled while the dropdown is open.

image

blvdmitry commented 10 months ago

👍 going to add this to 2.3 backlog, thanks for the request

mmailaender commented 10 months ago

This is also happening for Autocomplete component https://reshaped.so/content/docs/components/autocomplete

blvdmitry commented 10 months ago

Makes sense, all dropdowns are the same component under the hood, so the fix will patch all these behaviours

blvdmitry commented 10 months ago

Got it working in the next release branch. I will take a look into a few more reported issues and will ship a patch with the fixed somewhere during the week

image
blvdmitry commented 10 months ago

@Madhavkabra one thing I forgot to ask. It's now rendered relative to the trigger when used inside a scrollable area, but that also means it will get cut by the overflow. Do you have a use case where it has to still be rendered outside the scrollable area but still follow the trigger on scroll?