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.
@@ -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 that are hidden
23
- * (`hide`) or suppressed by their parent's collapsed state are excluded so the
24
- * announced span matches the columns actually rendered. Leaf headers return 1.
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;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "simple-table-core",
3
- "version": "4.0.2",
3
+ "version": "4.0.3",
4
4
  "main": "dist/cjs/index.js",
5
5
  "module": "dist/index.es.js",
6
6
  "types": "dist/index.d.ts",