summaryrefslogtreecommitdiff
path: root/components/client-table-v2/types.ts
diff options
context:
space:
mode:
Diffstat (limited to 'components/client-table-v2/types.ts')
-rw-r--r--components/client-table-v2/types.ts11
1 files changed, 11 insertions, 0 deletions
diff --git a/components/client-table-v2/types.ts b/components/client-table-v2/types.ts
new file mode 100644
index 00000000..b0752bfa
--- /dev/null
+++ b/components/client-table-v2/types.ts
@@ -0,0 +1,11 @@
+import { ColumnDef, RowData } from "@tanstack/react-table"
+
+export interface ClientTableColumnMeta {
+ filterType?: "text" | "select" | "boolean"
+ filterOptions?: { label: string; value: string }[]
+}
+
+// Use this type instead of generic ColumnDef to get intellisense for 'meta'
+export type ClientTableColumnDef<TData extends RowData, TValue = unknown> = ColumnDef<TData, TValue> & {
+ meta?: ClientTableColumnMeta
+}