@syncfusion/ej2-multicolumn-combobox 28.1.39 → 28.2.6

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.
@@ -902,7 +902,6 @@ let MultiColumnComboBox = class MultiColumnComboBox extends Component {
902
902
  };
903
903
  this.trigger('select', eventArgs, (eventArgs) => {
904
904
  if (!eventArgs.cancel && eventArgs.itemData) {
905
- const selectedRecord = eventArgs.itemData;
906
905
  const event = e;
907
906
  const isUpdateVal = event.key === 'Enter' || event.key === 'Tab' || event.shiftKey && event.key === 'Tab' || event.altKey && event.key === 'ArrowUp';
908
907
  if (!isKeyNav || (isKeyNav && isUpdateVal)) {
@@ -921,7 +920,7 @@ let MultiColumnComboBox = class MultiColumnComboBox extends Component {
921
920
  this.isProtectedOnChange = true;
922
921
  this.text = text || this.text;
923
922
  this.value = value || this.value;
924
- this.index = !isNullOrUndefined(index) ? index : this.index;
923
+ this.index = this.selectedRowIndex = !isNullOrUndefined(index) ? index : this.index;
925
924
  this.isProtectedOnChange = prevOnChange;
926
925
  if (!isInitial) {
927
926
  this.triggerChangeEvent(eventArgs);
@@ -981,7 +980,7 @@ let MultiColumnComboBox = class MultiColumnComboBox extends Component {
981
980
  filterDatas(dataSource, inputValue) {
982
981
  const data = dataSource.filter((item) => {
983
982
  const fieldText = this.updateFieldValue(this.fields.text, item);
984
- return fieldText.toLowerCase().startsWith(inputValue.toLowerCase());
983
+ return inputValue && fieldText.toLowerCase().startsWith(inputValue.toLowerCase());
985
984
  });
986
985
  const exactData = dataSource.filter((item) => {
987
986
  const fieldText = this.updateFieldValue(this.fields.text, item);
@@ -1156,7 +1155,7 @@ let MultiColumnComboBox = class MultiColumnComboBox extends Component {
1156
1155
  }
1157
1156
  return;
1158
1157
  }
1159
- if ((target.classList.contains('e-multicolumn-list-icon') || closest(target, '.e-popup'))) {
1158
+ if ((target.classList.contains('e-multicolumn-list-icon') || closest(target, '.e-multicolumn-list.e-popup'))) {
1160
1159
  e.preventDefault();
1161
1160
  }
1162
1161
  else {
@@ -1177,21 +1176,19 @@ let MultiColumnComboBox = class MultiColumnComboBox extends Component {
1177
1176
  }
1178
1177
  this.hidePopup(e);
1179
1178
  if (this.matchedRowEle && !isClearValues && val) {
1180
- setTimeout(() => {
1181
- const prevOnChange = this.isProtectedOnChange;
1182
- this.isProtectedOnChange = true;
1183
- const fieldText = this.updateFieldValue(this.fields.text, this.matchedContent);
1184
- const fieldValue = this.updateFieldValue(this.fields.value, this.matchedContent);
1185
- this.inputEle.value = fieldText;
1186
- this.value = fieldValue;
1187
- const selectIndex = this.findIndex(this.gridObj.currentViewData, this.matchedContent);
1188
- this.index = selectIndex;
1189
- this.text = fieldText;
1190
- this.gridObj.selectRow(selectIndex);
1191
- this.selectedGridRow(this.gridObj.getRowByIndex(selectIndex), e);
1192
- this.previousItemElement = this.gridObj.getSelectedRows()[0];
1193
- this.isProtectedOnChange = prevOnChange;
1194
- }, 100);
1179
+ const prevOnChange = this.isProtectedOnChange;
1180
+ this.isProtectedOnChange = true;
1181
+ const fieldText = this.updateFieldValue(this.fields.text, this.matchedContent);
1182
+ const fieldValue = this.updateFieldValue(this.fields.value, this.matchedContent);
1183
+ this.inputEle.value = fieldText;
1184
+ this.value = fieldValue;
1185
+ const selectIndex = this.findIndex(this.gridObj.currentViewData, this.matchedContent);
1186
+ this.index = selectIndex;
1187
+ this.text = fieldText;
1188
+ this.gridObj.selectRow(selectIndex);
1189
+ this.selectedGridRow(this.gridObj.getRowByIndex(selectIndex), e);
1190
+ this.previousItemElement = this.gridObj.getSelectedRows()[0];
1191
+ this.isProtectedOnChange = prevOnChange;
1195
1192
  }
1196
1193
  else {
1197
1194
  if (this.isDataFiltered) {
@@ -1428,20 +1425,7 @@ let MultiColumnComboBox = class MultiColumnComboBox extends Component {
1428
1425
  attributes(this.inputEle, { 'aria-expanded': 'true', 'aria-owns': this.element.id + '_popup', 'aria-controls': this.element.id });
1429
1426
  if (!isInputOpen) {
1430
1427
  if ((this.value || this.text || this.index)) {
1431
- const dataRows = this.gridObj.getRowsObject();
1432
- let groupIndex;
1433
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
1434
- dataRows.forEach((data, index) => {
1435
- if (this.fields.groupBy && isNullOrUndefined(data.data.items)) {
1436
- if (isNullOrUndefined(groupIndex)) {
1437
- groupIndex = 0;
1438
- }
1439
- else {
1440
- groupIndex += 1;
1441
- }
1442
- }
1443
- this.selectDataRow(data.data, !this.fields.groupBy ? index : groupIndex);
1444
- });
1428
+ this.gridObj.selectRow(this.selectedRowIndex);
1445
1429
  }
1446
1430
  this.focusIn(e);
1447
1431
  }
@@ -1462,7 +1446,7 @@ let MultiColumnComboBox = class MultiColumnComboBox extends Component {
1462
1446
  this.remoteDataLength = e.result.length;
1463
1447
  });
1464
1448
  }
1465
- this.popupObj.show(new Animation(eventArgs.animation), this.popupEle);
1449
+ this.popupObj.show(new Animation(eventArgs.animation), this.popupEle.firstElementChild);
1466
1450
  }
1467
1451
  });
1468
1452
  }