@starasia/admin 8.11.1 → 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.
|
@@ -28,6 +28,8 @@ interface SubHeaderProps {
|
|
|
28
28
|
order?: number;
|
|
29
29
|
/** Show the subtle bottom border (same style as the main header). Defaults to `true`. When `false`, the row's bottom padding is dropped too so the stack stays tight. */
|
|
30
30
|
borderBottom?: boolean;
|
|
31
|
+
/** Keep the `sm` bottom padding even when `borderBottom` is `false`. Defaults to `false`. Use this when you want the row spaced out from what follows but without drawing the divider line. */
|
|
32
|
+
keepBottomPadding?: boolean;
|
|
31
33
|
/** Whether this header row is rendered. Defaults to `true`. Set `false` to hide the row entirely (it's removed from the layout, not just visually hidden) — handy when the consumer toggles a row's visibility at runtime. */
|
|
32
34
|
show?: boolean;
|
|
33
35
|
}
|
|
@@ -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.
|