@starasia/admin 8.12.0 → 8.13.0
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/dist/components/TableLayout/TableLayout.d.ts +1 -1
- package/dist/components/TableLayout/types.d.ts +14 -0
- package/dist/index.cjs.js +18 -18
- package/dist/index.es.js +1685 -1683
- package/dist/index.umd.js +3 -3
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
import { TableLayoutProps } from './types';
|
|
3
3
|
|
|
4
|
-
export declare const TableLayout: <T>({ columns, data, getRowKey, size, resizable, widthStorageKey, columnState, onColumnStateChange, columnMenu, sort, defaultSort, onSortChange, height, mobileLayout, mobileBreakpoint, groupSeparator, summary, emptyState, loading, loadingRows, rowActions, }: TableLayoutProps<T>) => React.JSX.Element;
|
|
4
|
+
export declare const TableLayout: <T>({ columns, data, getRowKey, size, resizable, layout, widthStorageKey, columnState, onColumnStateChange, columnMenu, sort, defaultSort, onSortChange, height, mobileLayout, mobileBreakpoint, groupSeparator, summary, emptyState, loading, loadingRows, rowActions, }: TableLayoutProps<T>) => React.JSX.Element;
|
|
@@ -127,6 +127,20 @@ export interface TableLayoutProps<T> {
|
|
|
127
127
|
size?: 'sm' | 'md' | 'lg' | 'xl';
|
|
128
128
|
/** aktifkan drag-resize lebar kolom (default false) */
|
|
129
129
|
resizable?: boolean;
|
|
130
|
+
/**
|
|
131
|
+
* Algoritma lebar tabel:
|
|
132
|
+
* - 'auto' : lebar kolom mengikuti konten (default). `width` kolom hanya
|
|
133
|
+
* jadi saran — kolom tetap melebar mengikuti isi, sehingga teks panjang
|
|
134
|
+
* *wrap* alih-alih terpotong ellipsis.
|
|
135
|
+
* - 'fixed' : kunci kolom ke lebar yang ditetapkan (`width` kolom / hasil
|
|
136
|
+
* pengukuran natural). Hanya dengan ini value string yang melebihi lebar
|
|
137
|
+
* kolom akan terpotong `…` (ellipsis). Beri `width` pada kolom yang ingin
|
|
138
|
+
* dipotong; kolom tanpa `width` memakai lebar natural hasil ukur.
|
|
139
|
+
*
|
|
140
|
+
* Catatan: `resizable` selalu memaksa 'fixed' (drag butuh lebar pasti).
|
|
141
|
+
* Saat ada grouped header, layout fixed dinonaktifkan (sama seperti resize).
|
|
142
|
+
*/
|
|
143
|
+
layout?: 'auto' | 'fixed';
|
|
130
144
|
/**
|
|
131
145
|
* Kalau diisi, lebar hasil resize dipersist ke localStorage dengan key ini
|
|
132
146
|
* (lewat `useColumnWidths`) dan dipulihkan saat reload.
|