@syncfusion/ej2-multicolumn-combobox 27.2.2 → 27.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.
- package/dist/ej2-multicolumn-combobox.umd.min.js +2 -2
- package/dist/ej2-multicolumn-combobox.umd.min.js.map +1 -1
- package/dist/es6/ej2-multicolumn-combobox.es2015.js +41 -25
- package/dist/es6/ej2-multicolumn-combobox.es2015.js.map +1 -1
- package/dist/es6/ej2-multicolumn-combobox.es5.js +48 -30
- package/dist/es6/ej2-multicolumn-combobox.es5.js.map +1 -1
- package/dist/global/ej2-multicolumn-combobox.min.js +2 -2
- package/dist/global/ej2-multicolumn-combobox.min.js.map +1 -1
- package/dist/global/index.d.ts +1 -1
- package/package.json +6 -6
- package/src/multicolumn-combobox/multi-column-combo-box.d.ts +3 -0
- package/src/multicolumn-combobox/multi-column-combo-box.js +48 -30
|
@@ -309,19 +309,7 @@ var MultiColumnComboBox = /** @__PURE__ @class */ (function (_super) {
|
|
|
309
309
|
dataBound: function () { _this.onDataBound(); },
|
|
310
310
|
actionFailure: function (args) { _this.onActionFailure(args); },
|
|
311
311
|
actionBegin: function (args) { _this.trigger('actionBegin', args); },
|
|
312
|
-
actionComplete:
|
|
313
|
-
_this.trigger('actionComplete', args);
|
|
314
|
-
if (args.requestType === 'sorting') {
|
|
315
|
-
_this.updateRowSelection(args);
|
|
316
|
-
}
|
|
317
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
318
|
-
var dataRows = args.rows;
|
|
319
|
-
if (_this.isDataFiltered && dataRows.length > 0 && _this.inputEle.value !== '' && args.requestType !== 'sorting') {
|
|
320
|
-
var firstRowEle = _this.gridObj.getRows()[0];
|
|
321
|
-
firstRowEle.classList.add('e-row-focus');
|
|
322
|
-
}
|
|
323
|
-
_this.popupObj.refreshPosition();
|
|
324
|
-
},
|
|
312
|
+
actionComplete: this.handleActionComplete.bind(this),
|
|
325
313
|
keyPressed: function (args) {
|
|
326
314
|
if (args.key === 'Enter') {
|
|
327
315
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
@@ -352,6 +340,14 @@ var MultiColumnComboBox = /** @__PURE__ @class */ (function (_super) {
|
|
|
352
340
|
}
|
|
353
341
|
this.gridObj.appendTo(this.gridEle);
|
|
354
342
|
};
|
|
343
|
+
MultiColumnComboBox.prototype.handleActionComplete = function (args) {
|
|
344
|
+
this.trigger('actionComplete', args);
|
|
345
|
+
if (args.requestType === 'sorting') {
|
|
346
|
+
this.updateRowSelection(args);
|
|
347
|
+
}
|
|
348
|
+
this.popupObj.refreshPosition();
|
|
349
|
+
this.gridObj.element.querySelector('.e-content').scrollTop = 0;
|
|
350
|
+
};
|
|
355
351
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
356
352
|
MultiColumnComboBox.prototype.isRowMatching = function (data, selectedValue, selectedText) {
|
|
357
353
|
var values = Object.values(data).map(String);
|
|
@@ -452,6 +448,11 @@ var MultiColumnComboBox = /** @__PURE__ @class */ (function (_super) {
|
|
|
452
448
|
this.popupEle.style.visibility = 'unset';
|
|
453
449
|
this.isInitialRender = false;
|
|
454
450
|
}
|
|
451
|
+
var rowElements = this.gridObj.element.querySelectorAll('.e-row');
|
|
452
|
+
if (this.isDataFiltered && rowElements.length > 0 && this.inputEle.value !== '') {
|
|
453
|
+
var firstRowEle = rowElements[0];
|
|
454
|
+
firstRowEle.classList.add('e-row-focus');
|
|
455
|
+
}
|
|
455
456
|
};
|
|
456
457
|
MultiColumnComboBox.prototype.onActionFailure = function (args) {
|
|
457
458
|
this.trigger('actionFailure', args);
|
|
@@ -1279,33 +1280,44 @@ var MultiColumnComboBox = /** @__PURE__ @class */ (function (_super) {
|
|
|
1279
1280
|
}
|
|
1280
1281
|
};
|
|
1281
1282
|
MultiColumnComboBox.prototype.updateSelectedItem = function (e, isUpdateIndex, isInputTarget) {
|
|
1283
|
+
var _this = this;
|
|
1282
1284
|
if (isUpdateIndex === void 0) { isUpdateIndex = true; }
|
|
1283
1285
|
if (this.isPopupOpen) {
|
|
1284
|
-
var
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1286
|
+
var index_1 = this.fields.groupBy ? (this.gridObj.selectedRowIndex || 0) : this.gridObj.selectedRowIndex;
|
|
1287
|
+
var dataLength = this.dataSource instanceof DataManager ? this.remoteDataLength :
|
|
1288
|
+
this.dataSource.length;
|
|
1289
|
+
if ((index_1 === -1 && (e.action === 'moveDown' || e.action === 'moveUp')) || (e.action === 'home')) {
|
|
1290
|
+
index_1 = 0;
|
|
1288
1291
|
}
|
|
1289
|
-
else if ((
|
|
1290
|
-
|
|
1292
|
+
else if ((index_1 >= (dataLength - 1) && e.action === 'moveDown') || (e.action === 'end')) {
|
|
1293
|
+
index_1 = dataLength - 1;
|
|
1291
1294
|
}
|
|
1292
|
-
else if (e.action === 'moveDown' && (
|
|
1293
|
-
|
|
1295
|
+
else if (e.action === 'moveDown' && (index_1 >= 0 && index_1 <= (dataLength - 1)) && (this.fields.groupBy || isInputTarget)) {
|
|
1296
|
+
index_1 += 1;
|
|
1294
1297
|
}
|
|
1295
|
-
else if (e.action === 'moveUp' &&
|
|
1296
|
-
|
|
1298
|
+
else if (e.action === 'moveUp' && index_1 > 0 && (this.fields.groupBy) || isInputTarget) {
|
|
1299
|
+
index_1 -= 1;
|
|
1297
1300
|
}
|
|
1298
|
-
this.
|
|
1299
|
-
|
|
1300
|
-
var focusedEle = this.gridEle.querySelector('.e-row-focus');
|
|
1301
|
-
if (focusedEle) {
|
|
1302
|
-
focusedEle.classList.remove('e-row-focus');
|
|
1301
|
+
if (!this.enableVirtualization) {
|
|
1302
|
+
this.selectRow(e, isUpdateIndex, index_1);
|
|
1303
1303
|
}
|
|
1304
|
-
|
|
1305
|
-
|
|
1304
|
+
else {
|
|
1305
|
+
setTimeout(function () { _this.selectRow(e, isUpdateIndex, index_1); });
|
|
1306
1306
|
}
|
|
1307
1307
|
}
|
|
1308
1308
|
};
|
|
1309
|
+
MultiColumnComboBox.prototype.selectRow = function (e, isUpdateIndex, index) {
|
|
1310
|
+
if (isUpdateIndex === void 0) { isUpdateIndex = true; }
|
|
1311
|
+
this.gridObj.selectRow(index);
|
|
1312
|
+
this.gridObj.selectedRowIndex = index;
|
|
1313
|
+
var focusedEle = this.gridEle.querySelector('.e-row-focus');
|
|
1314
|
+
if (focusedEle) {
|
|
1315
|
+
focusedEle.classList.remove('e-row-focus');
|
|
1316
|
+
}
|
|
1317
|
+
if (isUpdateIndex) {
|
|
1318
|
+
this.selectedGridRow(this.gridObj.getRows()[parseInt(index.toString(), 10)], e, true);
|
|
1319
|
+
}
|
|
1320
|
+
};
|
|
1309
1321
|
MultiColumnComboBox.prototype.updateClearIconState = function () {
|
|
1310
1322
|
var clearIconEle = this.inputWrapper.querySelector('.e-clear-icon');
|
|
1311
1323
|
if (clearIconEle) {
|
|
@@ -1400,6 +1412,12 @@ var MultiColumnComboBox = /** @__PURE__ @class */ (function (_super) {
|
|
|
1400
1412
|
_this.inputEle.setAttribute('aria-activedescendant', contentEle.querySelector('.e-row').getAttribute('data-uid'));
|
|
1401
1413
|
}
|
|
1402
1414
|
}
|
|
1415
|
+
if (!isNullOrUndefined(_this.dataSource) && _this.dataSource instanceof DataManager) {
|
|
1416
|
+
_this.dataSource.executeQuery(new Query).then(function (e) {
|
|
1417
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1418
|
+
_this.remoteDataLength = e.result.length;
|
|
1419
|
+
});
|
|
1420
|
+
}
|
|
1403
1421
|
_this.popupObj.show(new Animation(eventArgs.animation), _this.popupEle);
|
|
1404
1422
|
}
|
|
1405
1423
|
});
|