react-glide-table 2.2.0 → 2.3.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.
@@ -220,6 +220,24 @@ declare module "@tanstack/react-table" {
220
220
  * Defaults to true.
221
221
  */
222
222
  reorderable?: boolean;
223
+ /**
224
+ * Explicit `Column.width` when provided. Used to distinguish fixed columns
225
+ * from flexible / min-max bounded columns during layout.
226
+ */
227
+ width?: number;
228
+ /**
229
+ * Minimum column width in px. Independent of column resize.
230
+ * With `maxWidth` and no `width`, layout picks a size in this range
231
+ * (preferring `maxWidth` when space allows) and leaves leftover space
232
+ * to unconstrained columns.
233
+ */
234
+ minWidth?: number;
235
+ /**
236
+ * Maximum column width in px. Independent of column resize.
237
+ * With `minWidth` and no `width`, layout prefers this size when space
238
+ * allows, then shrinks toward `minWidth` if the viewport is tight.
239
+ */
240
+ maxWidth?: number;
223
241
  }
224
242
  interface CellContext<TData, TValue> {
225
243
  /**
@@ -545,10 +563,23 @@ type TableColumnProps<T extends Record<string, unknown>, K extends string = keyo
545
563
  sortable?: boolean;
546
564
  /** Initial / default column width in px (TanStack `size`) */
547
565
  width?: number;
548
- /** Minimum resize width in px. Defaults to the table min when omitted */
566
+ /**
567
+ * Minimum column width in px. Independent of `enableColumnResize` / `minResizeWidth`.
568
+ * With `maxWidth` and no `width`, layout resolves a size in `[minWidth, maxWidth]`,
569
+ * preferring `maxWidth` when space allows, and leaves leftover space to columns
570
+ * without `width`.
571
+ */
549
572
  minWidth?: number;
550
- /** Maximum resize width in px. Defaults to the table max when omitted */
573
+ /**
574
+ * Maximum column width in px. Independent of `enableColumnResize` / `maxResizeWidth`.
575
+ * With `minWidth` and no `width`, layout prefers this size when space allows,
576
+ * then shrinks toward `minWidth` if the viewport is tight.
577
+ */
551
578
  maxWidth?: number;
579
+ /** Minimum drag-resize width in px. Defaults to the table min when omitted */
580
+ minResizeWidth?: number;
581
+ /** Maximum drag-resize width in px. Defaults to the table max when omitted */
582
+ maxResizeWidth?: number;
552
583
  /**
553
584
  * When false, this column cannot be resized even if `enableColumnResize` is on.
554
585
  * Defaults to true.
@@ -220,6 +220,24 @@ declare module "@tanstack/react-table" {
220
220
  * Defaults to true.
221
221
  */
222
222
  reorderable?: boolean;
223
+ /**
224
+ * Explicit `Column.width` when provided. Used to distinguish fixed columns
225
+ * from flexible / min-max bounded columns during layout.
226
+ */
227
+ width?: number;
228
+ /**
229
+ * Minimum column width in px. Independent of column resize.
230
+ * With `maxWidth` and no `width`, layout picks a size in this range
231
+ * (preferring `maxWidth` when space allows) and leaves leftover space
232
+ * to unconstrained columns.
233
+ */
234
+ minWidth?: number;
235
+ /**
236
+ * Maximum column width in px. Independent of column resize.
237
+ * With `minWidth` and no `width`, layout prefers this size when space
238
+ * allows, then shrinks toward `minWidth` if the viewport is tight.
239
+ */
240
+ maxWidth?: number;
223
241
  }
224
242
  interface CellContext<TData, TValue> {
225
243
  /**
@@ -545,10 +563,23 @@ type TableColumnProps<T extends Record<string, unknown>, K extends string = keyo
545
563
  sortable?: boolean;
546
564
  /** Initial / default column width in px (TanStack `size`) */
547
565
  width?: number;
548
- /** Minimum resize width in px. Defaults to the table min when omitted */
566
+ /**
567
+ * Minimum column width in px. Independent of `enableColumnResize` / `minResizeWidth`.
568
+ * With `maxWidth` and no `width`, layout resolves a size in `[minWidth, maxWidth]`,
569
+ * preferring `maxWidth` when space allows, and leaves leftover space to columns
570
+ * without `width`.
571
+ */
549
572
  minWidth?: number;
550
- /** Maximum resize width in px. Defaults to the table max when omitted */
573
+ /**
574
+ * Maximum column width in px. Independent of `enableColumnResize` / `maxResizeWidth`.
575
+ * With `minWidth` and no `width`, layout prefers this size when space allows,
576
+ * then shrinks toward `minWidth` if the viewport is tight.
577
+ */
551
578
  maxWidth?: number;
579
+ /** Minimum drag-resize width in px. Defaults to the table min when omitted */
580
+ minResizeWidth?: number;
581
+ /** Maximum drag-resize width in px. Defaults to the table max when omitted */
582
+ maxResizeWidth?: number;
552
583
  /**
553
584
  * When false, this column cannot be resized even if `enableColumnResize` is on.
554
585
  * Defaults to true.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-glide-table",
3
- "version": "2.2.0",
3
+ "version": "2.3.0",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/zpxlffjrm/react-glide-table.git"