feat: add text filter on org member list (#17632)

* feat: improve text filters (WIP)

* move function to bottom

* apply some styles

* fix selection of TextFilterOptions

* rename value to operand

* remove unused file

* merge filters/filters into filters/utils

* fix regression of not putting url params correctly

* move makeWhereClause to filters/utils

* fix negative, empty, and not empty operators

* fix initial filtering from search state (url)

* fix type errors

* do not send an empty array to query

* update yarn.lock

* i18n for text filter operators

* extract logic as useColumnFilters()

* add missing import

* fix type error

* revert yarn.lock

* use i18n

* insensitive text match

* move data-table to @calcom/features

* fix type errors

* fix type errors

* fix type errors

---------

Co-authored-by: Udit Takkar <[email protected]>
This commit is contained in:
Eunjae LeeandUdit Takkar authored and GitHub committed 2024-11-20 09:38:10 +00:00
1 parent ff18b9a733
commit 1404581f78
28 files changed
+520 -309

No files matched your search

@@ -2,9 +2,9 @@ import type { ColumnDef } from "@tanstack/react-table";
import { useReactTable, getCoreRowModel } from "@tanstack/react-table";
import { useRef, useState } from "react";
import { DataTable, DataTableToolbar } from "@calcom/features/data-table";
import { useLocale } from "@calcom/lib/hooks/useLocale";
import { trpc } from "@calcom/trpc/react";
import { DataTable, DataTableToolbar } from "@calcom/ui";
import CreateTeamDialog from "./CreateTeamDialog";
import GroupNameCell from "./GroupNameCell";
@@ -17,6 +17,13 @@ import { useQueryState, parseAsBoolean } from "nuqs";
import { useMemo, useReducer, useRef, useState } from "react";
import type { Dispatch, SetStateAction } from "react";
import {
DataTable,
DataTableToolbar,
DataTableFilters,
DataTableSelectionBar,
useFetchMoreOnBottomReached,
} from "@calcom/features/data-table";
import { useOrgBranding } from "@calcom/features/ee/organizations/context/provider";
import { DynamicLink } from "@calcom/features/users/components/UserTable/BulkActions/DynamicLink";
import { WEBAPP_URL } from "@calcom/lib/constants";
@@ -31,10 +38,6 @@ import {
Button,
ButtonGroup,
Checkbox,
DataTable,
DataTableToolbar,
DataTableFilters,
DataTableSelectionBar,
ConfirmationDialogContent,
Dialog,
DialogClose,
@@ -49,7 +52,6 @@ import {
showToast,
Tooltip,
} from "@calcom/ui";
import { useFetchMoreOnBottomReached } from "@calcom/ui/data-table";
import DeleteBulkTeamMembers from "./DeleteBulkTeamMembers";
import { EditMemberSheet } from "./EditMemberSheet";