@alaarab/ogrid-angular-primeng 2.1.11 → 2.1.12

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/esm/index.js CHANGED
@@ -473,9 +473,16 @@ var DataGridTableComponent = class extends BaseDataGridTableComponent {
473
473
  );
474
474
  this.tableWidthStyle = computed(() => {
475
475
  if (this.showEmptyInGrid()) return "100%";
476
+ if (this.allowOverflowX()) return "fit-content";
476
477
  if (this.layoutMode === "content") return "fit-content";
477
478
  return "100%";
478
479
  });
480
+ this.tableMinWidthStyle = computed(() => {
481
+ if (this.showEmptyInGrid()) return "100%";
482
+ if (this.allowOverflowX()) return "max-content";
483
+ if (this.layoutMode === "content") return "max-content";
484
+ return "100%";
485
+ });
479
486
  this.initBase();
480
487
  }
481
488
  ngOnChanges(changes) {
@@ -781,7 +788,7 @@ DataGridTableComponent = __decorateClass([
781
788
  [attr.aria-labelledby]="ariaLabelledBy()"
782
789
  [attr.data-empty]="showEmptyInGrid() ? 'true' : null"
783
790
  [attr.data-column-count]="state().layout.totalColCount"
784
- [attr.data-suppress-scroll]="getProps()?.suppressHorizontalScroll ? 'true' : null"
791
+ [attr.data-overflow-x]="allowOverflowX() ? 'true' : 'false'"
785
792
  [attr.data-has-selection]="rowSelectionMode !== 'none' ? 'true' : null"
786
793
  (contextmenu)="$event.preventDefault()"
787
794
  (keydown)="onGridKeyDown($event)"
@@ -792,7 +799,7 @@ DataGridTableComponent = __decorateClass([
792
799
  >
793
800
  <div class="ogrid-table-wrapper">
794
801
  <div [class.loading-dimmed]="isLoading() && items().length > 0" class="ogrid-table-wrapper">
795
- <div #tableContainer class="ogrid-table-anchor">
802
+ <div #tableContainer class="ogrid-table-wrapper">
796
803
  <table class="ogrid-table" role="grid">
797
804
  <thead [class]="stickyHeader() ? 'ogrid-thead ogrid-sticky-header' : 'ogrid-thead'">
798
805
  @for (row of headerRows(); track $index; let rowIdx = $index) {
@@ -1094,20 +1101,13 @@ DataGridTableComponent = __decorateClass([
1094
1101
  background: var(--ogrid-bg, #ffffff);
1095
1102
  color: var(--ogrid-fg, rgba(0, 0, 0, 0.87));
1096
1103
  }
1097
- .ogrid-scroll-wrapper[data-suppress-scroll='true'] { overflow-x: hidden; }
1098
1104
  .ogrid-scroll-wrapper--loading-empty { min-height: 200px; }
1099
1105
  .ogrid-table-wrapper {
1100
1106
  position: relative;
1101
1107
  }
1102
- .ogrid-table-anchor {
1103
- position: relative;
1104
- width: max-content;
1105
- min-width: 100%;
1106
- overflow: clip;
1107
- }
1108
1108
  .ogrid-table {
1109
- width: 100%;
1110
- min-width: max-content;
1109
+ width: var(--data-table-width, 100%);
1110
+ min-width: var(--data-table-min-width, 100%);
1111
1111
  border-collapse: collapse;
1112
1112
  table-layout: fixed;
1113
1113
  }
@@ -90,6 +90,7 @@ export declare class DataGridTableComponent<T = unknown> extends BaseDataGridTab
90
90
  protected getTableContainerRef(): ElementRef<HTMLElement> | undefined;
91
91
  readonly resolvedAriaLabel: import("@angular/core").Signal<string | undefined>;
92
92
  readonly tableWidthStyle: import("@angular/core").Signal<"100%" | "fit-content">;
93
+ readonly tableMinWidthStyle: import("@angular/core").Signal<"100%" | "max-content">;
93
94
  getColumnWidth(col: IColumnDef<T>): number;
94
95
  trackByRowId(_index: number, item: T): RowId;
95
96
  onSelectAllChangePrimeng(checked: boolean): void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alaarab/ogrid-angular-primeng",
3
- "version": "2.1.11",
3
+ "version": "2.1.12",
4
4
  "description": "OGrid PrimeNG – PrimeNG Table-based data grid with sorting, filtering, pagination, column chooser, and CSV export.",
5
5
  "main": "dist/esm/index.js",
6
6
  "module": "dist/esm/index.js",
@@ -37,7 +37,7 @@
37
37
  "node": ">=18"
38
38
  },
39
39
  "dependencies": {
40
- "@alaarab/ogrid-angular": "2.1.11"
40
+ "@alaarab/ogrid-angular": "2.1.12"
41
41
  },
42
42
  "peerDependencies": {
43
43
  "@angular/core": "^21.0.0",