New Changes with Column Type
This commit is contained in:
@@ -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">
|
||||||
|
|||||||
@@ -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;
|
||||||
|
|||||||
Reference in New Issue
Block a user