@selectwin/kit 0.1.109 → 0.1.111
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/SelectDataTable.d.ts +16 -1
- package/dist/index.js +244 -222
- package/dist/style.css +1 -1
- package/package.json +1 -1
|
@@ -62,7 +62,7 @@ export interface SelectDataColumn<T> {
|
|
|
62
62
|
* guards mirror SelectMoney — storage unavailable = in-memory only.
|
|
63
63
|
*/
|
|
64
64
|
export declare function useSelectPageSize(key: string, fallback: number, options?: number[]): [number, (size: number) => void];
|
|
65
|
-
export declare function SelectDataTable<T>({ columns, items, getId, loading, empty, pagination, onRowClick, title, help, description, action, filters, columnsKey, }: {
|
|
65
|
+
export declare function SelectDataTable<T>({ columns, items, getId, loading, empty, pagination, onRowClick, title, help, description, action, filters, columnsKey, getChildren, defaultExpanded, }: {
|
|
66
66
|
columns: SelectDataColumn<T>[];
|
|
67
67
|
items: T[];
|
|
68
68
|
getId: (item: T) => string;
|
|
@@ -103,4 +103,19 @@ export declare function SelectDataTable<T>({ columns, items, getId, loading, emp
|
|
|
103
103
|
* stays visible.
|
|
104
104
|
*/
|
|
105
105
|
columnsKey?: string;
|
|
106
|
+
/**
|
|
107
|
+
* Linhas agrupadas. Um item para o qual isto devolve uma lista NÃO vazia vira linha-mãe: a
|
|
108
|
+
* linha inteira abre e fecha (chevron na primeira célula) e as filhas vêm logo abaixo,
|
|
109
|
+
* recuadas e num fundo afundado, na MESMA grade de colunas — o `nested` da SelectTable. As
|
|
110
|
+
* linhas sem filhas reservam o espaço do chevron, para a primeira coluna seguir alinhada.
|
|
111
|
+
*
|
|
112
|
+
* A linha-mãe é um <button>: as colunas não podem desenhar controle interativo nela — devolva
|
|
113
|
+
* `null` na coluna de ações para o item-grupo. `onRowClick` vale para as outras linhas; na mãe,
|
|
114
|
+
* o clique é o abrir/fechar. A ordenação reordena as mães entre si e as filhas dentro de cada
|
|
115
|
+
* mãe: uma filha nunca sai de baixo da sua. As filhas não têm filhas (um nível só).
|
|
116
|
+
*/
|
|
117
|
+
getChildren?: (item: T) => T[] | null | undefined;
|
|
118
|
+
/** Mães abertas no primeiro render (padrão: todas fechadas). Avaliado por item, então vale
|
|
119
|
+
* também para a mãe que só chega na página seguinte. */
|
|
120
|
+
defaultExpanded?: (item: T) => boolean;
|
|
106
121
|
}): import("react").JSX.Element;
|