intelica-library-ui 0.1.191 → 0.1.193

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.
@@ -2612,7 +2612,14 @@ class TreeTableComponent {
2612
2612
  CurrentPage = 1;
2613
2613
  SearchInput = {};
2614
2614
  ListSearchOptionsSimple = [];
2615
+ LoadSearchOptions() {
2616
+ this.ListSearchOptionsSimple = this.ListSearchOptions.map((item) => ({
2617
+ id: item.id,
2618
+ value: item.name,
2619
+ }));
2620
+ }
2615
2621
  ngOnChanges() {
2622
+ this.LoadSearchOptions();
2616
2623
  this.ListDataFilter = [...this.ListData];
2617
2624
  if (!this.SortField && this.DefaultSortField) {
2618
2625
  this.SortField = this.DefaultSortField;
@@ -2655,7 +2662,20 @@ class TreeTableComponent {
2655
2662
  this.UpdatePages();
2656
2663
  }
2657
2664
  ExecuteSearch(event) {
2665
+ if (event?.fieldText !== undefined && event?.fieldText !== "")
2666
+ this.SearchInput = event;
2658
2667
  this.ListDataFilter = [...this.ListData];
2668
+ if (this.SearchInput?.searchText !== undefined &&
2669
+ this.SearchInput?.searchText !== "" &&
2670
+ this.ListSearchOptions.length > 0) {
2671
+ let Search = this.SearchInput.searchText?.trim()?.toLowerCase();
2672
+ let searchValue = this.ListSearchOptions.find((item) => item.id === this.SearchInput.fieldId)?.field || "code";
2673
+ this.ListDataFilter = this.SharedService.GetFilteredSearchKey([...this.ListData], searchValue, Search, this.SearchInput.operatorId);
2674
+ if (this.PaginatorTable) {
2675
+ this.PaginatorTable.CurrentPage = 1;
2676
+ this.CurrentPage = 1;
2677
+ }
2678
+ }
2659
2679
  this.SortPages();
2660
2680
  }
2661
2681
  OnHeaderCheckboxChange(event, field) {