New Changes with Column Type

This commit is contained in:
2025-11-14 23:23:13 +05:30
parent fb2931c2ce
commit 440dc1d14e
2 changed files with 8 additions and 1 deletions
+7 -1
View File
@@ -73,7 +73,13 @@ const id = `table-${Math.random().toString(36).slice(2, 9)}`;
col.width ? `width:${col.width}` : "" col.width ? `width:${col.width}` : ""
} }
data-sort-key={ data-sort-key={
col.sortable ? col.key : undefined col.sortable
? col.alias
? col.alias +
"." +
(col.key as any)
: col.key
: undefined
} }
> >
<div class="wr:flex wr:items-center wr:gap-1"> <div class="wr:flex wr:items-center wr:gap-1">
+1
View File
@@ -14,6 +14,7 @@ export type ClassNames = {
export interface Column<T> { export interface Column<T> {
key: keyof T | string; key: keyof T | string;
label: string; label: string;
alias?: string;
path?: string; path?: string;
sortable?: boolean; sortable?: boolean;
searchable?: boolean; searchable?: boolean;