simple-table-core 4.0.2 → 4.0.3
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/cjs/index.js +1 -1
- package/dist/core/rendering/RenderOrchestrator.d.ts +2 -0
- package/dist/core/rendering/TableRenderer.d.ts +6 -0
- package/dist/index.es.js +1 -1
- package/dist/types/SimpleTableConfig.d.ts +6 -0
- package/dist/types/SimpleTableProps.d.ts +9 -0
- package/dist/utils/cellUtils.d.ts +1 -0
- package/dist/utils/collapseUtils.d.ts +4 -3
- package/dist/utils/headerLayoutUtils.d.ts +9 -0
- package/package.json +1 -1
|
@@ -66,6 +66,12 @@ export interface SimpleTableConfig {
|
|
|
66
66
|
externalFilterHandling?: boolean;
|
|
67
67
|
externalSortHandling?: boolean;
|
|
68
68
|
footerRenderer?: (props: FooterRendererProps) => HTMLElement | string | null;
|
|
69
|
+
/**
|
|
70
|
+
* @see SimpleTableProps.footerRenderKey
|
|
71
|
+
* Included in the custom-footer reuse key so external footer state can bust
|
|
72
|
+
* the scroll-safe cache without replacing the `footerRenderer` function.
|
|
73
|
+
*/
|
|
74
|
+
footerRenderKey?: string | number;
|
|
69
75
|
/** Placement of the pagination footer. Default `"bottom"`. */
|
|
70
76
|
footerPosition?: FooterPosition;
|
|
71
77
|
headerDropdown?: VanillaHeaderDropdown;
|
|
@@ -88,6 +88,15 @@ export interface SimpleTableProps {
|
|
|
88
88
|
externalFilterHandling?: boolean;
|
|
89
89
|
externalSortHandling?: boolean;
|
|
90
90
|
footerRenderer?: (props: FooterRendererProps) => HTMLElement | string | null;
|
|
91
|
+
/**
|
|
92
|
+
* Cache key for a custom `footerRenderer`. Include any external state the
|
|
93
|
+
* footer reads (e.g. a loading flag) so the footer re-renders when that
|
|
94
|
+
* state changes even if page/row-count inputs are unchanged.
|
|
95
|
+
*
|
|
96
|
+
* Scroll-driven re-renders still reuse the previous footer DOM when this key
|
|
97
|
+
* (and pagination inputs) are stable — that avoids scroll-snap regressions.
|
|
98
|
+
*/
|
|
99
|
+
footerRenderKey?: string | number;
|
|
91
100
|
footerPosition?: FooterPosition;
|
|
92
101
|
headerDropdown?: HeaderDropdown;
|
|
93
102
|
height?: string | number;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import HeaderObject, { Accessor } from "../types/HeaderObject";
|
|
2
2
|
import { Pinned } from "../types/Pinned";
|
|
3
3
|
import { RowId } from "../types/RowId";
|
|
4
|
+
export { isHeaderExcludedFromLayout } from "./headerLayoutUtils";
|
|
4
5
|
export declare const getCellId: ({ accessor, rowId }: {
|
|
5
6
|
accessor: Accessor;
|
|
6
7
|
rowId: RowId;
|
|
@@ -19,9 +19,10 @@ export declare const getAllChildHeaders: (header: HeaderObject) => HeaderObject[
|
|
|
19
19
|
export declare const hasCollapsibleChildren: (header: HeaderObject) => boolean;
|
|
20
20
|
/**
|
|
21
21
|
* Number of visible leaf (bottom-level) columns a header spans, for
|
|
22
|
-
* `aria-colspan` on grouped/nested header cells. Leaf headers
|
|
23
|
-
* (`hide`) or suppressed by their parent's
|
|
24
|
-
*
|
|
22
|
+
* `aria-colspan` on grouped/nested header cells. Leaf headers excluded from
|
|
23
|
+
* layout (`hide` / `excludeFromRender`) or suppressed by their parent's
|
|
24
|
+
* collapsed state are omitted so the announced span matches the columns
|
|
25
|
+
* actually rendered. Leaf headers return 1.
|
|
25
26
|
*/
|
|
26
27
|
export declare const getHeaderColspan: (header: HeaderObject, rootHeaders: HeaderObject[], collapsedHeaders: Set<Accessor>) => number;
|
|
27
28
|
/**
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type HeaderObject from "../types/HeaderObject";
|
|
2
|
+
/**
|
|
3
|
+
* True when a column must not participate in table layout: cells, widths,
|
|
4
|
+
* positions, colspan, pinned-section math, etc.
|
|
5
|
+
*
|
|
6
|
+
* Covers both user-hidden columns (`hide`) and export-only columns
|
|
7
|
+
* (`excludeFromRender`). Prefer this over checking either flag alone.
|
|
8
|
+
*/
|
|
9
|
+
export declare const isHeaderExcludedFromLayout: (header: Pick<HeaderObject, "hide" | "excludeFromRender">) => boolean;
|