fix: dropdowns should have a max-height & padding from screen (#8055)

Fixes: #6105 

### Problem

- The dropdown gets clipped when the number of filters increases. 

### Solution

- Added scroll property to the ```DropdownMenu``` 
- Added size middleware to the floating UI hook.
- Provided padding of 20px to the size middleware, so that it maintains
distance from the bottom of the screen.

[Screencast from 2024-10-25
13-47-04.webm](https://github.com/user-attachments/assets/c2315ee2-6092-4c4a-8126-dba7ac3bf49b)

---------

Co-authored-by: martmull <martmull@hotmail.fr>
This commit is contained in:
Harsh Singh
2024-10-28 22:29:57 +05:30
committed by GitHub
parent cabae4c462
commit e648d942a2
2 changed files with 20 additions and 4 deletions

View File

@@ -25,6 +25,8 @@ const StyledDropdownMenu = styled.div<{
flex-direction: column;
z-index: 30;
overflow-y: scroll;
overflow-x: hidden;
width: ${({ width = 160 }) =>
typeof width === 'number' ? `${width}px` : width};
`;