chrv-components 1.12.231 → 1.12.232

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.
Binary file
@@ -8544,6 +8544,12 @@ class DataGrid {
8544
8544
  this.log = (event) => {
8545
8545
  console.log(`[DataGrid-${this.id()}]`, event);
8546
8546
  };
8547
+ this.autoDataSource = new AutoDataSource({
8548
+ enableClientSideFiltering: true,
8549
+ enableClientSidePagination: true,
8550
+ enableClientSideSorting: true,
8551
+ pageSize: this.pageSize(),
8552
+ });
8547
8553
  effect(() => {
8548
8554
  if (this.table() && !this.crossRequestTrackingPersistence()) {
8549
8555
  this.resetChanges();
@@ -8566,17 +8572,11 @@ class DataGrid {
8566
8572
  ngOnInit() {
8567
8573
  this.onInit.emit();
8568
8574
  if (this.table() === undefined || this.table() === null) {
8569
- if (!this.autoDataSource) {
8570
- this.autoDataSource = new AutoDataSource({
8571
- enableClientSideFiltering: true,
8572
- enableClientSidePagination: true,
8573
- enableClientSideSorting: true,
8574
- initialData: new AutoDataTable(this.name() ?? '', this.primaryKey(), this.metadata()),
8575
- pageSize: this.pageSize(),
8576
- });
8575
+ if (this.autoDataSource) {
8576
+ this.autoDataSource.setData(new AutoDataTable(this.name() ?? '', this.primaryKey(), this.metadata()));
8577
8577
  this.autoDataSource.registerDataGrid(this);
8578
+ this.autoDataSource.setRows(this.data() ?? []);
8578
8579
  }
8579
- this.autoDataSource.setRows(this.data() ?? []);
8580
8580
  }
8581
8581
  }
8582
8582
  ngOnDestroy() { }