@akshar-technosoft/ui 1.1.4 → 1.2.1

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/index.d.cts CHANGED
@@ -444,6 +444,29 @@ type TableHeaderProps = {
444
444
  type GroupColumnDef<TData> = ColumnDef<TData> & {
445
445
  columns?: GroupColumnDef<TData>[];
446
446
  enablePinning?: boolean;
447
+ /**
448
+ * Per-column override for `settings.enableColumnVisibility` — hide capability, not visibility
449
+ * state. `false` keeps this column out of the toolbar's Columns menu and the header `⋯` menu's
450
+ * Hide entry entirely, even while table-wide visibility toggling stays on for the rest. Same
451
+ * effect as TanStack's native `enableHiding`, named to match the table-level setting — set
452
+ * either one, not both (an explicit `enableHiding` wins if both are present).
453
+ */
454
+ enableColumnVisibility?: boolean;
455
+ /**
456
+ * Set `false` to hide the header's "⋯" options menu on this column entirely, regardless of
457
+ * whether sorting/pinning/hiding would otherwise make it appear. Use this when a column
458
+ * shouldn't offer the menu at all (e.g. an actions column) rather than disabling sorting and
459
+ * pinning separately just to make the dots go away.
460
+ */
461
+ enableHeaderMenu?: boolean;
462
+ /**
463
+ * Reserve space on the right of the header for the sort chevron / "⋯" menu instead of letting
464
+ * them float as a hover-only overlay. The rest of the table intentionally keeps that area as a
465
+ * zero-width overlay so hovering never shifts layout — opt in here only for columns with a
466
+ * custom interactive `header` (e.g. a button of your own) that the overlay would otherwise sit
467
+ * on top of.
468
+ */
469
+ reserveMenuSpace?: boolean;
447
470
  headerAlign?: 'left' | 'center' | 'right';
448
471
  customFooter?: ColumnFooter<TData>;
449
472
  /**
@@ -460,6 +483,16 @@ type GroupColumnDef<TData> = ColumnDef<TData> & {
460
483
  * `header` is used as-is and does not need this.
461
484
  */
462
485
  exportHeader?: string;
486
+ /**
487
+ * Pin this column by default, on mount. Applied once to the table's initial pinning state —
488
+ * a user's later manual pin/unpin (via the header "⋯" menu) is never overridden.
489
+ */
490
+ defaultPin?: 'left' | 'right';
491
+ /**
492
+ * Order among columns that default-pin to the same side. Lower sits closer to the table's
493
+ * outer edge. Defaults to declaration order when omitted. Inert without `defaultPin`.
494
+ */
495
+ pinIndex?: number;
463
496
  };
464
497
  type DataTableProps<TData> = {
465
498
  /** Row data. Rendered client-side (filter/sort/paginate all in-memory unless server-driven). */
package/dist/index.d.ts CHANGED
@@ -444,6 +444,29 @@ type TableHeaderProps = {
444
444
  type GroupColumnDef<TData> = ColumnDef<TData> & {
445
445
  columns?: GroupColumnDef<TData>[];
446
446
  enablePinning?: boolean;
447
+ /**
448
+ * Per-column override for `settings.enableColumnVisibility` — hide capability, not visibility
449
+ * state. `false` keeps this column out of the toolbar's Columns menu and the header `⋯` menu's
450
+ * Hide entry entirely, even while table-wide visibility toggling stays on for the rest. Same
451
+ * effect as TanStack's native `enableHiding`, named to match the table-level setting — set
452
+ * either one, not both (an explicit `enableHiding` wins if both are present).
453
+ */
454
+ enableColumnVisibility?: boolean;
455
+ /**
456
+ * Set `false` to hide the header's "⋯" options menu on this column entirely, regardless of
457
+ * whether sorting/pinning/hiding would otherwise make it appear. Use this when a column
458
+ * shouldn't offer the menu at all (e.g. an actions column) rather than disabling sorting and
459
+ * pinning separately just to make the dots go away.
460
+ */
461
+ enableHeaderMenu?: boolean;
462
+ /**
463
+ * Reserve space on the right of the header for the sort chevron / "⋯" menu instead of letting
464
+ * them float as a hover-only overlay. The rest of the table intentionally keeps that area as a
465
+ * zero-width overlay so hovering never shifts layout — opt in here only for columns with a
466
+ * custom interactive `header` (e.g. a button of your own) that the overlay would otherwise sit
467
+ * on top of.
468
+ */
469
+ reserveMenuSpace?: boolean;
447
470
  headerAlign?: 'left' | 'center' | 'right';
448
471
  customFooter?: ColumnFooter<TData>;
449
472
  /**
@@ -460,6 +483,16 @@ type GroupColumnDef<TData> = ColumnDef<TData> & {
460
483
  * `header` is used as-is and does not need this.
461
484
  */
462
485
  exportHeader?: string;
486
+ /**
487
+ * Pin this column by default, on mount. Applied once to the table's initial pinning state —
488
+ * a user's later manual pin/unpin (via the header "⋯" menu) is never overridden.
489
+ */
490
+ defaultPin?: 'left' | 'right';
491
+ /**
492
+ * Order among columns that default-pin to the same side. Lower sits closer to the table's
493
+ * outer edge. Defaults to declaration order when omitted. Inert without `defaultPin`.
494
+ */
495
+ pinIndex?: number;
463
496
  };
464
497
  type DataTableProps<TData> = {
465
498
  /** Row data. Rendered client-side (filter/sort/paginate all in-memory unless server-driven). */