ngx-render-material-forms 1.5.6 → 1.5.7

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.
@@ -2563,6 +2563,7 @@ class MaterialSelectComponent extends MaterialComponent {
2563
2563
  this.searching = false;
2564
2564
  this.productList = [];
2565
2565
  this.selectedValue = '';
2566
+ this.searchItem = "";
2566
2567
  // Variable to hold the reference to the current panel element
2567
2568
  this.currentPanelElement = null;
2568
2569
  this.openCounter = 1;
@@ -2577,6 +2578,7 @@ class MaterialSelectComponent extends MaterialComponent {
2577
2578
  clearProducts() {
2578
2579
  if (this.instance.component.key.toLowerCase() === 'vendorproductid') {
2579
2580
  this.onClearAll();
2581
+ this.searchItem = "";
2580
2582
  }
2581
2583
  }
2582
2584
  scrumble(msg) {
@@ -2778,20 +2780,25 @@ class MaterialSelectComponent extends MaterialComponent {
2778
2780
  this.pageSize = 20;
2779
2781
  this.searchQuery = '';
2780
2782
  this.searching = false;
2783
+ this.selectedValue = this.getValue();
2784
+ if (this.searchItem?.length > 0) {
2785
+ this.websiteMultiFilterCtrl.setValue(this.searchItem);
2786
+ this.ref.detectChanges();
2787
+ }
2781
2788
  //this.loadData(this.pageNumber, this.pageSize, this.searchQuery);
2782
2789
  this.registerPanelScrollEvent(this.selectElem);
2783
2790
  }
2784
2791
  else {
2785
2792
  this.removePanelScrollEvent();
2786
2793
  this.searching = false;
2787
- this.selectedValue = this.getValue();
2788
- if (this.selectedValue?.toString().length == 0) {
2789
- this.productList = [];
2790
- this.pageNumber = 1;
2791
- this.pageSize = 20;
2792
- this.searchQuery = '';
2793
- this.loadData(this.pageNumber, this.pageSize, this.searchQuery);
2794
- }
2794
+ // this.selectedValue = this.getValue();
2795
+ // if (this.selectedValue?.toString().length == 0) {
2796
+ // this.productList = [];
2797
+ // this.pageNumber = 1;
2798
+ // this.pageSize = 20;
2799
+ // this.searchQuery = '';
2800
+ // this.loadData(this.pageNumber, this.pageSize, this.searchQuery);
2801
+ // }
2795
2802
  }
2796
2803
  });
2797
2804
  }
@@ -2817,6 +2824,7 @@ class MaterialSelectComponent extends MaterialComponent {
2817
2824
  this.productList = [];
2818
2825
  this.searching = true;
2819
2826
  this.searchQuery = searchQuery;
2827
+ this.searchItem = searchQuery;
2820
2828
  this.loadData(this.pageNumber, this.pageSize, searchQuery);
2821
2829
  }
2822
2830
  });