@snowpact/react-tanstack-query-table 1.5.6 → 1.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +53 -0
- package/dist/index.cjs +12 -12
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +19 -2
- package/dist/index.js +1149 -1142
- package/dist/index.js.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { Column } from '@tanstack/react-table';
|
|
2
2
|
import { ColumnDef } from '@tanstack/react-table';
|
|
3
|
-
import { ColumnMeta } from '@tanstack/react-table';
|
|
4
3
|
import { ComponentType } from 'react';
|
|
5
4
|
import { JSX } from 'react/jsx-runtime';
|
|
6
5
|
import { OnChangeFn } from '@tanstack/react-table';
|
|
@@ -327,7 +326,25 @@ export declare type SnowColumnConfig<T extends object> = {
|
|
|
327
326
|
sortable?: boolean;
|
|
328
327
|
render?: (item: T) => ReactNode;
|
|
329
328
|
searchableValue?: (item: T) => string;
|
|
330
|
-
meta?:
|
|
329
|
+
meta?: SnowColumnMeta;
|
|
330
|
+
};
|
|
331
|
+
|
|
332
|
+
/**
|
|
333
|
+
* Column metadata for customizing column appearance and behavior
|
|
334
|
+
*/
|
|
335
|
+
export declare type SnowColumnMeta = {
|
|
336
|
+
/** Column width (CSS value, e.g., '200px', '20%', 'auto') */
|
|
337
|
+
width?: string | number;
|
|
338
|
+
/** Column minimum width (CSS value) */
|
|
339
|
+
minWidth?: string | number;
|
|
340
|
+
/** Column maximum width (CSS value) */
|
|
341
|
+
maxWidth?: string | number;
|
|
342
|
+
/** Whether the column is hidden by default in column configuration */
|
|
343
|
+
defaultHidden?: boolean;
|
|
344
|
+
/** Disable row click handler for this column (e.g., for action columns) */
|
|
345
|
+
disableColumnClick?: boolean;
|
|
346
|
+
/** Center the content of this column */
|
|
347
|
+
center?: boolean;
|
|
331
348
|
};
|
|
332
349
|
|
|
333
350
|
export declare const SnowServerDataTable: <T extends Record<string, unknown>, K = unknown>({ queryKey, columnConfig, actions, filters, prefilters, defaultSortBy, defaultSortOrder, defaultPageSize, persistState, fetchServerEndpoint, ...restProps }: SnowServerDataTableProps<T, K>) => JSX.Element;
|