@syncfusion/ej2-multicolumn-combobox 28.1.37 → 28.2.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.
@@ -972,7 +972,6 @@ var MultiColumnComboBox = /** @__PURE__ @class */ (function (_super) {
972
972
  };
973
973
  this.trigger('select', eventArgs, function (eventArgs) {
974
974
  if (!eventArgs.cancel && eventArgs.itemData) {
975
- var selectedRecord = eventArgs.itemData;
976
975
  var event_1 = e;
977
976
  var isUpdateVal = event_1.key === 'Enter' || event_1.key === 'Tab' || event_1.shiftKey && event_1.key === 'Tab' || event_1.altKey && event_1.key === 'ArrowUp';
978
977
  if (!isKeyNav || (isKeyNav && isUpdateVal)) {
@@ -991,7 +990,7 @@ var MultiColumnComboBox = /** @__PURE__ @class */ (function (_super) {
991
990
  this.isProtectedOnChange = true;
992
991
  this.text = text || this.text;
993
992
  this.value = value || this.value;
994
- this.index = !isNullOrUndefined(index) ? index : this.index;
993
+ this.index = this.selectedRowIndex = !isNullOrUndefined(index) ? index : this.index;
995
994
  this.isProtectedOnChange = prevOnChange;
996
995
  if (!isInitial) {
997
996
  this.triggerChangeEvent(eventArgs);
@@ -1062,7 +1061,7 @@ var MultiColumnComboBox = /** @__PURE__ @class */ (function (_super) {
1062
1061
  var _this = this;
1063
1062
  var data = dataSource.filter(function (item) {
1064
1063
  var fieldText = _this.updateFieldValue(_this.fields.text, item);
1065
- return fieldText.toLowerCase().startsWith(inputValue.toLowerCase());
1064
+ return inputValue && fieldText.toLowerCase().startsWith(inputValue.toLowerCase());
1066
1065
  });
1067
1066
  var exactData = dataSource.filter(function (item) {
1068
1067
  var fieldText = _this.updateFieldValue(_this.fields.text, item);
@@ -1255,7 +1254,6 @@ var MultiColumnComboBox = /** @__PURE__ @class */ (function (_super) {
1255
1254
  }
1256
1255
  };
1257
1256
  MultiColumnComboBox.prototype.updateValuesOnInput = function (mouseEvent, keyEvent, isClearValues, isKeyDown) {
1258
- var _this = this;
1259
1257
  if (isKeyDown === void 0) { isKeyDown = false; }
1260
1258
  var e = mouseEvent ? mouseEvent : keyEvent;
1261
1259
  var val = isKeyDown ? this.matchedContent : this.exactMatchedContent;
@@ -1264,21 +1262,19 @@ var MultiColumnComboBox = /** @__PURE__ @class */ (function (_super) {
1264
1262
  }
1265
1263
  this.hidePopup(e);
1266
1264
  if (this.matchedRowEle && !isClearValues && val) {
1267
- setTimeout(function () {
1268
- var prevOnChange = _this.isProtectedOnChange;
1269
- _this.isProtectedOnChange = true;
1270
- var fieldText = _this.updateFieldValue(_this.fields.text, _this.matchedContent);
1271
- var fieldValue = _this.updateFieldValue(_this.fields.value, _this.matchedContent);
1272
- _this.inputEle.value = fieldText;
1273
- _this.value = fieldValue;
1274
- var selectIndex = _this.findIndex(_this.gridObj.currentViewData, _this.matchedContent);
1275
- _this.index = selectIndex;
1276
- _this.text = fieldText;
1277
- _this.gridObj.selectRow(selectIndex);
1278
- _this.selectedGridRow(_this.gridObj.getRowByIndex(selectIndex), e);
1279
- _this.previousItemElement = _this.gridObj.getSelectedRows()[0];
1280
- _this.isProtectedOnChange = prevOnChange;
1281
- }, 100);
1265
+ var prevOnChange = this.isProtectedOnChange;
1266
+ this.isProtectedOnChange = true;
1267
+ var fieldText = this.updateFieldValue(this.fields.text, this.matchedContent);
1268
+ var fieldValue = this.updateFieldValue(this.fields.value, this.matchedContent);
1269
+ this.inputEle.value = fieldText;
1270
+ this.value = fieldValue;
1271
+ var selectIndex = this.findIndex(this.gridObj.currentViewData, this.matchedContent);
1272
+ this.index = selectIndex;
1273
+ this.text = fieldText;
1274
+ this.gridObj.selectRow(selectIndex);
1275
+ this.selectedGridRow(this.gridObj.getRowByIndex(selectIndex), e);
1276
+ this.previousItemElement = this.gridObj.getSelectedRows()[0];
1277
+ this.isProtectedOnChange = prevOnChange;
1282
1278
  }
1283
1279
  else {
1284
1280
  if (this.isDataFiltered) {
@@ -1519,20 +1515,7 @@ var MultiColumnComboBox = /** @__PURE__ @class */ (function (_super) {
1519
1515
  attributes(_this.inputEle, { 'aria-expanded': 'true', 'aria-owns': _this.element.id + '_popup', 'aria-controls': _this.element.id });
1520
1516
  if (!isInputOpen) {
1521
1517
  if ((_this.value || _this.text || _this.index)) {
1522
- var dataRows = _this.gridObj.getRowsObject();
1523
- var groupIndex_1;
1524
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
1525
- dataRows.forEach(function (data, index) {
1526
- if (_this.fields.groupBy && isNullOrUndefined(data.data.items)) {
1527
- if (isNullOrUndefined(groupIndex_1)) {
1528
- groupIndex_1 = 0;
1529
- }
1530
- else {
1531
- groupIndex_1 += 1;
1532
- }
1533
- }
1534
- _this.selectDataRow(data.data, !_this.fields.groupBy ? index : groupIndex_1);
1535
- });
1518
+ _this.gridObj.selectRow(_this.selectedRowIndex);
1536
1519
  }
1537
1520
  _this.focusIn(e);
1538
1521
  }