ngx-render-material-forms 1.1.2 → 1.1.4

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.
@@ -2562,21 +2562,6 @@ class MaterialSelectComponent extends MaterialComponent {
2562
2562
  });
2563
2563
  this.filteredOptions = this.selectOptions;
2564
2564
  }
2565
- calculateViewportHeight() {
2566
- if (!this.viewport)
2567
- return 0;
2568
- // Get the range of rendered items
2569
- const renderedRange = this.viewport.getRenderedRange();
2570
- // Get the number of items in the rendered range
2571
- const itemCount = renderedRange.end - renderedRange.start;
2572
- console.log(itemCount);
2573
- // Calculate the total height of items
2574
- const totalHeight = itemCount * 200; // Assuming each item has a height of 50 pixels
2575
- // Add extra padding if needed
2576
- const padding = 500; // Adjust as needed
2577
- // Return the calculated height
2578
- return totalHeight + padding;
2579
- }
2580
2565
  // onFilter(value) {
2581
2566
  // this.filteredOptions = this.selectOptions.then((options) => {
2582
2567
  // const filtered = options.filter((option) => option.label.toLowerCase().indexOf(value.toLowerCase()) !== -1);
@@ -2589,7 +2574,7 @@ class MaterialSelectComponent extends MaterialComponent {
2589
2574
  }
2590
2575
  }
2591
2576
  MaterialSelectComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: MaterialSelectComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
2592
- MaterialSelectComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.3", type: MaterialSelectComponent, selector: "mat-formio-select", viewQueries: [{ propertyName: "multiSelect", first: true, predicate: ["multiSelect"], descendants: true, static: true }, { propertyName: "viewport", first: true, predicate: ["viewport"], descendants: true }], usesInheritance: true, ngImport: i0, template: `
2577
+ MaterialSelectComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.3", type: MaterialSelectComponent, selector: "mat-formio-select", viewQueries: [{ propertyName: "multiSelect", first: true, predicate: ["multiSelect"], descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: `
2593
2578
  <mat-formio-form-field [instance]="instance" [componentTemplate]="componentTemplate"></mat-formio-form-field>
2594
2579
  <ng-template #componentTemplate let-hasLabel>
2595
2580
  <mat-form-field fxFill>
@@ -2614,7 +2599,7 @@ MaterialSelectComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0"
2614
2599
  </mat-option>
2615
2600
 
2616
2601
  <ng-container *ngIf="(filteredOptions | async)?.length > 4; else regularOptions">
2617
- <cdk-virtual-scroll-viewport itemSize="50" [minBufferPx]="500" [maxBufferPx]="1000" class="example-viewport">
2602
+ <cdk-virtual-scroll-viewport itemSize="5" [minBufferPx]="500" [maxBufferPx]="70000" class="example-viewport">
2618
2603
  <mat-option *cdkVirtualFor="let option of filteredOptions | async" [value]="option.value">
2619
2604
  <span [innerHTML]="option.label"></span>
2620
2605
  </mat-option>
@@ -2666,7 +2651,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImpor
2666
2651
  </mat-option>
2667
2652
 
2668
2653
  <ng-container *ngIf="(filteredOptions | async)?.length > 4; else regularOptions">
2669
- <cdk-virtual-scroll-viewport itemSize="50" [minBufferPx]="500" [maxBufferPx]="1000" class="example-viewport">
2654
+ <cdk-virtual-scroll-viewport itemSize="5" [minBufferPx]="500" [maxBufferPx]="70000" class="example-viewport">
2670
2655
  <mat-option *cdkVirtualFor="let option of filteredOptions | async" [value]="option.value">
2671
2656
  <span [innerHTML]="option.label"></span>
2672
2657
  </mat-option>
@@ -2694,9 +2679,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImpor
2694
2679
  }], propDecorators: { multiSelect: [{
2695
2680
  type: ViewChild,
2696
2681
  args: ['multiSelect', { static: true }]
2697
- }], viewport: [{
2698
- type: ViewChild,
2699
- args: ['viewport']
2700
2682
  }] } });
2701
2683
  SelectComponent.MaterialComponent = MaterialSelectComponent;
2702
2684
  // Make sure we detect changes when new items make their way into the select dropdown.