From 24163b26440ac69b27c9ad7270ba873eb6697d4b Mon Sep 17 00:00:00 2001 From: Pablo Lara Date: Tue, 1 Oct 2024 04:59:07 +0200 Subject: [PATCH] chore: Style tweaks for filters --- components/filters/data-filters.ts | 2 +- components/filters/filter-controls.tsx | 2 +- .../providers/table/columns-provider.tsx | 2 +- .../table/data-table-filter-custom.tsx | 15 ++-- .../ui/custom/custom-dropdown-filter.tsx | 75 ++++++++----------- components/ui/sidebar/SidebarWrap.tsx | 2 +- 6 files changed, 39 insertions(+), 59 deletions(-) diff --git a/components/filters/data-filters.ts b/components/filters/data-filters.ts index eb05d0dc5e..9aea8e9dd3 100644 --- a/components/filters/data-filters.ts +++ b/components/filters/data-filters.ts @@ -6,7 +6,7 @@ export const filtersProviders = [ }, { key: "connected", - labelCheckboxGroup: "Status provider", + labelCheckboxGroup: "Connection", values: ["false", "true"], }, // Add more filter categories as needed diff --git a/components/filters/filter-controls.tsx b/components/filters/filter-controls.tsx index 5f185a6629..13d4962b26 100644 --- a/components/filters/filter-controls.tsx +++ b/components/filters/filter-controls.tsx @@ -58,7 +58,7 @@ export const FilterControls: React.FC = ({ {showClearButton && ( { export const ColumnsProvider: ColumnDef[] = [ { - header: "n", + header: " ", cell: ({ row }) =>

{row.index + 1}

, }, { diff --git a/components/providers/table/data-table-filter-custom.tsx b/components/providers/table/data-table-filter-custom.tsx index 04e6df67f2..b43b55f3f4 100644 --- a/components/providers/table/data-table-filter-custom.tsx +++ b/components/providers/table/data-table-filter-custom.tsx @@ -1,6 +1,5 @@ "use client"; -import { Divider } from "@nextui-org/react"; import { useRouter, useSearchParams } from "next/navigation"; import React, { useState } from "react"; import { useCallback } from "react"; @@ -37,7 +36,7 @@ export const DataTableFilterCustom = ({ ); return ( -
+
-
+
{filters.map((filter) => ( ))} -
- - Selected -
diff --git a/components/ui/custom/custom-dropdown-filter.tsx b/components/ui/custom/custom-dropdown-filter.tsx index 1911f3a961..29741c65dd 100644 --- a/components/ui/custom/custom-dropdown-filter.tsx +++ b/components/ui/custom/custom-dropdown-filter.tsx @@ -1,7 +1,6 @@ "use client"; import { - Badge, Button, Checkbox, CheckboxGroup, @@ -9,6 +8,7 @@ import { Popover, PopoverContent, PopoverTrigger, + ScrollShadow, } from "@nextui-org/react"; import _ from "lodash"; import { useSearchParams } from "next/navigation"; @@ -90,11 +90,11 @@ export const CustomDropdownFilter: React.FC = ({ } }, [groupSelected, allFilterKeys]); return ( -
- +
+
); }; diff --git a/components/ui/sidebar/SidebarWrap.tsx b/components/ui/sidebar/SidebarWrap.tsx index 2da8d70670..6fcf559f93 100644 --- a/components/ui/sidebar/SidebarWrap.tsx +++ b/components/ui/sidebar/SidebarWrap.tsx @@ -42,7 +42,7 @@ export const SidebarWrap = () => { return (