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:
1 parent
ff18b9a733
commit
1404581f78
28 files changed
+520
-309
No files matched your search
@@ -0,0 +1,45 @@
|
||||
"use client";
|
||||
|
||||
import type { Table } from "@tanstack/react-table";
|
||||
import { forwardRef } from "react";
|
||||
|
||||
import { classNames } from "@calcom/lib";
|
||||
import type { IconName } from "@calcom/ui";
|
||||
|
||||
export type ActionItem<TData> =
|
||||
| {
|
||||
type: "action";
|
||||
label: string;
|
||||
onClick: () => void;
|
||||
icon?: IconName;
|
||||
needsXSelected?: number;
|
||||
}
|
||||
| {
|
||||
type: "render";
|
||||
render: (table: Table<TData>) => React.ReactNode;
|
||||
needsXSelected?: number;
|
||||
};
|
||||
|
||||
const Root = forwardRef<
|
||||
HTMLDivElement,
|
||||
React.HTMLAttributes<HTMLDivElement> & { showSelectionCount?: boolean }
|
||||
>(({ children, ...props }, ref) => {
|
||||
return (
|
||||
<div
|
||||
ref={ref}
|
||||
className={classNames(
|
||||
"bg-brand-default text-brand fixed bottom-4 left-1/2 flex w-fit -translate-x-1/2 transform items-center space-x-3 rounded-lg px-4 py-2",
|
||||
props.className
|
||||
)}
|
||||
style={{ ...props.style }}
|
||||
{...props}>
|
||||
{children}
|
||||
</div>
|
||||
);
|
||||
});
|
||||
|
||||
Root.displayName = "Root";
|
||||
|
||||
export const DataTableSelectionBar = {
|
||||
Root,
|
||||
};
|
||||
Reference in new issue
Block a user