@syncfusion/ej2-multicolumn-combobox 26.2.10 → 26.2.12

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.
@@ -896,23 +896,35 @@ let MultiColumnComboBox = class MultiColumnComboBox extends Component {
896
896
  }
897
897
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
898
898
  filterAction(dataSource, inputValue, query, fields) {
899
- const filterType = this.filterType.toString().toLowerCase();
900
- const isQuery = query || new Query();
901
- let filteredData;
902
- if (dataSource instanceof DataManager) {
903
- // Handle filtering for DataManager
904
- dataSource.executeQuery(isQuery).then((e) => {
905
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
906
- const dataLists = e.result;
907
- const dataLength = dataLists.length;
908
- filteredData = dataLists.filter((item) => this.filterData(item, filterType, inputValue, fields));
909
- this.updateGridDataSource(filteredData, dataLength);
899
+ let dataLists;
900
+ if (isNullOrUndefined(query) && isNullOrUndefined(fields)) {
901
+ this.updateGridDataSource(dataSource);
902
+ }
903
+ else if (query) {
904
+ new DataManager(dataSource).executeQuery(query).then((e) => {
905
+ dataLists = e.result;
906
+ this.updateGridDataSource(dataLists);
910
907
  });
911
908
  }
912
- else if (Array.isArray(dataSource)) {
913
- // Handle filtering for array data source
914
- filteredData = dataSource.filter((item) => this.filterData(item, filterType, inputValue, fields));
915
- this.updateGridDataSource(filteredData);
909
+ else {
910
+ const filterType = this.filterType.toString().toLowerCase();
911
+ const isQuery = query || new Query();
912
+ let filteredData;
913
+ if (dataSource instanceof DataManager) {
914
+ // Handle filtering for DataManager
915
+ dataSource.executeQuery(isQuery).then((e) => {
916
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
917
+ const dataLists = e.result;
918
+ const dataLength = dataLists.length;
919
+ filteredData = dataLists.filter((item) => this.filterData(item, filterType, inputValue, fields));
920
+ this.updateGridDataSource(filteredData, dataLength);
921
+ });
922
+ }
923
+ else if (Array.isArray(dataSource)) {
924
+ // Handle filtering for array data source
925
+ filteredData = dataSource.filter((item) => this.filterData(item, filterType, inputValue, fields));
926
+ this.updateGridDataSource(filteredData);
927
+ }
916
928
  }
917
929
  }
918
930
  filterData(item, filterType, inputValue, fields) {
@@ -1489,8 +1501,10 @@ let MultiColumnComboBox = class MultiColumnComboBox extends Component {
1489
1501
  break;
1490
1502
  case 'sortOrder':
1491
1503
  if (this.gridObj) {
1492
- this.gridObj.sortSettings.columns = [{ field: this.fields.text, direction: newProp.sortOrder === SortOrder.Ascending ?
1493
- SortOrder.Ascending : SortOrder.Descending }];
1504
+ this.gridObj.sortSettings.columns = [{
1505
+ field: this.fields.text, direction: newProp.sortOrder === SortOrder.Ascending ?
1506
+ SortOrder.Ascending : SortOrder.Descending
1507
+ }];
1494
1508
  }
1495
1509
  break;
1496
1510
  case 'htmlAttributes':