ngx-render-material-forms 1.9.1 → 1.9.3

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.
@@ -3510,12 +3510,18 @@ class AddOnProductsComponent {
3510
3510
  handleDropdownFilter() {
3511
3511
  const searchQuery = this.form.controls.searchProductName?.value?.trim(); // Trim to remove blank spaces
3512
3512
  const levelOneId = this.form.controls.dropdownLevel1?.value?.id;
3513
+ this.loadingFlag = false; // Disable scroll-based loading during search
3514
+ if (this.firstscrollableDiv) {
3515
+ this.firstscrollableDiv.nativeElement.scrollTop = 0; // Reset scroll position
3516
+ }
3513
3517
  if ((searchQuery && searchQuery !== '') || (levelOneId && levelOneId !== null && levelOneId !== undefined)) {
3514
3518
  this.searchQuery = this.form.controls.searchProductName?.value;
3515
3519
  this.levelOneId = this.form.controls.dropdownLevel1.value?.id;
3516
3520
  this.levelTwoId = this.form.controls.dropdownLevel2.value?.id;
3517
3521
  this.levelThreeId = this.form.controls.dropdownLevel3.value?.id;
3518
3522
  this.levelFourId = this.form.controls.dropdownLevel4.value?.id;
3523
+ this.pageNumber = 1;
3524
+ this.pageSize = 20;
3519
3525
  this.getProducts(false);
3520
3526
  }
3521
3527
  }
@@ -3747,7 +3753,7 @@ class AddOnProductsComponent {
3747
3753
  const existingProductValues = new Set(this.dataSource.data.map(product => product.value));
3748
3754
  const uniqueNewData = data.filter(product => !existingProductValues.has(product.value));
3749
3755
  if (this.dataSource.data.length > 0 && flag) {
3750
- //data.forEach(item => this.dataSource.data.push(item));
3756
+ // data.forEach(item => this.dataSource.data.push(item));
3751
3757
  this.dataSource.data = [...this.dataSource.data, ...uniqueNewData];
3752
3758
  }
3753
3759
  else {
@@ -3756,7 +3762,7 @@ class AddOnProductsComponent {
3756
3762
  this.loadingFlag = true;
3757
3763
  setTimeout(() => {
3758
3764
  const middlePosition = this.trackHeight / 2 - 50;
3759
- if (this.firstscrollableDiv && this.firstscrollableDiv.nativeElement) {
3765
+ if (this.firstscrollableDiv && this.firstscrollableDiv.nativeElement && flag) {
3760
3766
  this.firstscrollableDiv.nativeElement.scrollTo({ top: middlePosition, behavior: 'auto' });
3761
3767
  }
3762
3768
  }, 250);
@@ -4188,7 +4194,7 @@ MaterialDataGridComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.
4188
4194
  <ng-template #noDataMessage>
4189
4195
  <div class="no-data-message" *ngIf="isCustomerCountryFiltered && emptyArray">
4190
4196
  <span>
4191
- No Product found with selected Customer country.
4197
+ No Product found with the selected Customer country.
4192
4198
  </span>
4193
4199
  </div>
4194
4200
  </ng-template>
@@ -4248,7 +4254,7 @@ MaterialDataGridComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.
4248
4254
 
4249
4255
  </mat-card-content>
4250
4256
  <mat-card-actions *ngIf="instance.hasAddButton() && instance.component.addAnotherPosition !== 'top'">
4251
- <button mat-raised-button color="primary" (click)="addAnother()">
4257
+ <button mat-raised-button color="primary" (click)="addAnother()" *ngIf="!(isCustomerCountryFiltered && emptyArray)">
4252
4258
  <mat-icon>add</mat-icon>
4253
4259
  {{instance.component.addAnother || 'Add Another'}}
4254
4260
  </button>
@@ -4330,7 +4336,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImpor
4330
4336
  <ng-template #noDataMessage>
4331
4337
  <div class="no-data-message" *ngIf="isCustomerCountryFiltered && emptyArray">
4332
4338
  <span>
4333
- No Product found with selected Customer country.
4339
+ No Product found with the selected Customer country.
4334
4340
  </span>
4335
4341
  </div>
4336
4342
  </ng-template>
@@ -4390,7 +4396,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImpor
4390
4396
 
4391
4397
  </mat-card-content>
4392
4398
  <mat-card-actions *ngIf="instance.hasAddButton() && instance.component.addAnotherPosition !== 'top'">
4393
- <button mat-raised-button color="primary" (click)="addAnother()">
4399
+ <button mat-raised-button color="primary" (click)="addAnother()" *ngIf="!(isCustomerCountryFiltered && emptyArray)">
4394
4400
  <mat-icon>add</mat-icon>
4395
4401
  {{instance.component.addAnother || 'Add Another'}}
4396
4402
  </button>