@simple-table/react 3.8.0 → 3.8.2

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.
@@ -225,6 +225,13 @@ export declare class SimpleTableVanilla {
225
225
  private isAutoSizeLeaf;
226
226
  private computeAutoSizeAccessors;
227
227
  private getAutoSizeStyleRoot;
228
+ /**
229
+ * Rows that content-fit ("auto") measurement should sample. With client-side
230
+ * pagination only the current page is rendered, so fit columns to the page's
231
+ * rows rather than the entire dataset — otherwise off-page values inflate
232
+ * every auto column's width.
233
+ */
234
+ private getAutoSizeRows;
228
235
  /** Immutably write measured pixel widths into the leaf headers. */
229
236
  private applyMeasuredWidths;
230
237
  /**
@@ -17,7 +17,7 @@ export interface ContentHeightConfig {
17
17
  /**
18
18
  * Converts a height value (string or number) to pixels
19
19
  */
20
- export declare const convertHeightToPixels: (heightValue: string | number) => number;
20
+ export declare const convertHeightToPixels: (heightValue: string | number, container?: Element | null) => number;
21
21
  /**
22
22
  * Calculates the content height for the table.
23
23
  * This is a pure function alternative to the useContentHeight hook.
@@ -1,4 +1,4 @@
1
- import HeaderObject from "../types/HeaderObject";
1
+ import HeaderObject, { Accessor } from "../types/HeaderObject";
2
2
  interface AutoScaleConfig {
3
3
  autoExpandColumns: boolean;
4
4
  containerWidth: number;
@@ -8,6 +8,13 @@ interface AutoScaleConfig {
8
8
  current: HTMLDivElement | null;
9
9
  };
10
10
  isResizing?: boolean;
11
+ /**
12
+ * Currently collapsed header accessors. Auto-scale must only account for the
13
+ * leaf columns that are actually visible for the current collapsed state —
14
+ * otherwise it sums the widths of hidden child columns and under-expands,
15
+ * leaving empty space on the right.
16
+ */
17
+ collapsedHeaders?: Set<Accessor>;
11
18
  }
12
19
  type HeaderUpdateCallback = (headers: HeaderObject[]) => void;
13
20
  export declare const applyAutoScaleToHeaders: (headers: HeaderObject[], options: AutoScaleConfig) => HeaderObject[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@simple-table/react",
3
- "version": "3.8.0",
3
+ "version": "3.8.2",
4
4
  "main": "dist/cjs/index.js",
5
5
  "module": "dist/index.es.js",
6
6
  "types": "dist/types/react/src/index.d.ts",
@@ -29,7 +29,7 @@
29
29
  "react-dom": ">=18.0.0"
30
30
  },
31
31
  "dependencies": {
32
- "simple-table-core": "3.8.0"
32
+ "simple-table-core": "3.8.2"
33
33
  },
34
34
  "devDependencies": {
35
35
  "@rollup/plugin-alias": "^4.0.4",