feat(select): enhance dropdown positioning and filtering functionality
- Introduced a new measureDropdownRect function to accurately position the dropdown menu based on viewport dimensions, improving usability. - Updated the Select component to utilize the new dropdown measurement logic, ensuring consistent placement above or below the trigger. - Refactored panelRect state management to use a more structured DropdownRect type, enhancing type safety and clarity. - Improved event handling for dropdown visibility and positioning during scroll and resize events, ensuring a responsive user experience. - Adjusted styling in related components for better alignment and visual consistency.
This commit is contained in:
@@ -5,6 +5,7 @@ import { Select } from "@/components/FormElements/select";
|
||||
import { Button } from "@/components/ui-elements/button";
|
||||
import InlineListFiltersPanel from "@/components/ui/InlineListFiltersPanel";
|
||||
import { Currencies } from "@/constants/enums";
|
||||
import { useMemo } from "react";
|
||||
import {
|
||||
FieldValues,
|
||||
UseFormHandleSubmit,
|
||||
@@ -12,7 +13,6 @@ import {
|
||||
UseFormSetValue,
|
||||
UseFormWatch,
|
||||
} from "react-hook-form";
|
||||
import { useMemo } from "react";
|
||||
|
||||
interface CompanyListFiltersProps {
|
||||
filterRegister: UseFormRegister<FieldValues>;
|
||||
@@ -60,7 +60,6 @@ const CompanyListFilters = ({
|
||||
return (
|
||||
<InlineListFiltersPanel
|
||||
title="Filter companies"
|
||||
description="Filter by identity, currency, or headcount — inline, no popup."
|
||||
activeFilterCount={activeCount}
|
||||
expandAriaLabel="Expand company filters"
|
||||
collapseAriaLabel="Collapse company filters"
|
||||
|
||||
Reference in New Issue
Block a user