Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[GEN-2203]: add dropdown direction handling to open upwards when near…
… bottom of the viewport (#2190) This pull request includes enhancements to the `Dropdown` component in the `frontend/webapp/reuseable-components/dropdown/index.tsx` file, focusing on improving its functionality and user experience. The most important changes include adding a feature to open the dropdown upwards if it is near the bottom of the screen and updating related styles and logic. Enhancements to `Dropdown` component: * Introduced the `openUpwards` state and `handleDirection` function to determine the direction in which the dropdown should open based on its position relative to the viewport. * Passed the `openUpwards` state as a prop to the `DropdownList` component to control its rendering direction. * Updated the `AbsoluteContainer` styled component to conditionally apply the `top` or `bottom` style based on the `$openUpwards` prop. * Modified the `DropdownList` component to accept the `openUpwards` prop and pass it to the `AbsoluteContainer` for dynamic positioning.
- Loading branch information