From f3b7fc6eb5af867c54bfde316b7433b8180450e6 Mon Sep 17 00:00:00 2001 From: Aaryan Khandelwal <65252264+aaryan610@users.noreply.github.com> Date: Thu, 23 Mar 2023 23:25:08 +0530 Subject: [PATCH] fix: filters dropdown overflowing issue (#513) * fix: filters dropdown overflowing issue * filters dropdown z-index --- .../core/board-view/single-issue.tsx | 4 ++-- .../app/components/core/issues-view-filter.tsx | 1 + .../app/components/ui/multi-level-dropdown.tsx | 18 +++++++++++++++--- apps/app/components/views/select-filters.tsx | 9 ++++++++- 4 files changed, 26 insertions(+), 6 deletions(-) diff --git a/apps/app/components/core/board-view/single-issue.tsx b/apps/app/components/core/board-view/single-issue.tsx index 01623b41e..4df5ad35c 100644 --- a/apps/app/components/core/board-view/single-issue.tsx +++ b/apps/app/components/core/board-view/single-issue.tsx @@ -189,7 +189,7 @@ export const SingleBoardIssue: React.FC = ({ isOpen={contextMenu} setIsOpen={setContextMenu} > - {!isNotAllowed &&( + {!isNotAllowed && ( <> Edit issue @@ -222,7 +222,7 @@ export const SingleBoardIssue: React.FC = ({ >
{!isNotAllowed && ( -
+
{type && !isNotAllowed && ( Edit issue diff --git a/apps/app/components/core/issues-view-filter.tsx b/apps/app/components/core/issues-view-filter.tsx index a3a5621c7..0bf5d21e5 100644 --- a/apps/app/components/core/issues-view-filter.tsx +++ b/apps/app/components/core/issues-view-filter.tsx @@ -83,6 +83,7 @@ export const IssuesFilterView: React.FC = () => { ); }} direction="left" + height="rg" /> {({ open }) => ( diff --git a/apps/app/components/ui/multi-level-dropdown.tsx b/apps/app/components/ui/multi-level-dropdown.tsx index fac674d14..1ce14a802 100644 --- a/apps/app/components/ui/multi-level-dropdown.tsx +++ b/apps/app/components/ui/multi-level-dropdown.tsx @@ -22,6 +22,7 @@ type MultiLevelDropdownProps = { }[]; onSelect: (value: any) => void; direction?: "left" | "right"; + height?: "sm" | "md" | "rg" | "lg"; }; export const MultiLevelDropdown: React.FC = ({ @@ -29,6 +30,7 @@ export const MultiLevelDropdown: React.FC = ({ options, onSelect, direction = "right", + height = "md", }) => { const [openChildFor, setOpenChildFor] = useState(null); @@ -58,7 +60,7 @@ export const MultiLevelDropdown: React.FC = ({ > {options.map((option) => (
@@ -100,10 +102,20 @@ export const MultiLevelDropdown: React.FC = ({ {option.children && option.id === openChildFor && (
@@ -118,7 +130,7 @@ export const MultiLevelDropdown: React.FC = ({ className={({ active }) => `${ active || child.selected ? "bg-gray-100" : "text-gray-900" - } flex w-full items-center rounded px-1 py-1.5 capitalize` + } flex w-full items-center break-all rounded px-1 py-1.5 capitalize` } > {child.label} diff --git a/apps/app/components/views/select-filters.tsx b/apps/app/components/views/select-filters.tsx index 496147be1..297be737f 100644 --- a/apps/app/components/views/select-filters.tsx +++ b/apps/app/components/views/select-filters.tsx @@ -22,9 +22,15 @@ type Props = { filters: IIssueFilterOptions | IQuery; onSelect: (option: any) => void; direction?: "left" | "right"; + height?: "sm" | "md" | "rg" | "lg"; }; -export const SelectFilters: React.FC = ({ filters, onSelect, direction = "right" }) => { +export const SelectFilters: React.FC = ({ + filters, + onSelect, + direction = "right", + height = "md", +}) => { const router = useRouter(); const { workspaceSlug, projectId } = router.query; @@ -48,6 +54,7 @@ export const SelectFilters: React.FC = ({ filters, onSelect, direction = label="Filters" onSelect={onSelect} direction={direction} + height={height} options={[ { id: "priority",