@syncfusion/ej2-multicolumn-combobox 28.2.7 → 29.1.33
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/README.md +1 -1
- 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 +103 -24
- package/dist/es6/ej2-multicolumn-combobox.es2015.js.map +1 -1
- package/dist/es6/ej2-multicolumn-combobox.es5.js +106 -24
- 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/memory-leak-samples/mccb.d.ts +1 -0
- package/memory-leak-samples/mccb.html +35 -0
- package/memory-leak-samples/mccb.js +109 -0
- package/package.json +8 -8
- package/src/multicolumn-combobox/multi-column-combo-box-model.d.ts +1 -1
- package/src/multicolumn-combobox/multi-column-combo-box.d.ts +5 -0
- package/src/multicolumn-combobox/multi-column-combo-box.js +105 -23
- package/styles/bds-lite.css +60 -1
- package/styles/bds-lite.scss +1 -0
- package/styles/bds.css +70 -1
- package/styles/bds.scss +1 -0
- package/styles/bootstrap-dark-lite.css +60 -1
- package/styles/bootstrap-dark-lite.scss +1 -0
- package/styles/bootstrap-dark.css +70 -1
- package/styles/bootstrap-dark.scss +1 -0
- package/styles/bootstrap-lite.css +60 -1
- package/styles/bootstrap-lite.scss +1 -0
- package/styles/bootstrap.css +70 -1
- package/styles/bootstrap.scss +1 -0
- package/styles/bootstrap4-lite.css +60 -1
- package/styles/bootstrap4-lite.scss +1 -0
- package/styles/bootstrap4.css +70 -1
- package/styles/bootstrap4.scss +1 -0
- package/styles/bootstrap5-dark-lite.css +61 -2
- package/styles/bootstrap5-dark-lite.scss +1 -0
- package/styles/bootstrap5-dark.css +71 -2
- package/styles/bootstrap5-dark.scss +1 -0
- package/styles/bootstrap5-lite.css +60 -1
- package/styles/bootstrap5-lite.scss +1 -0
- package/styles/bootstrap5.3-lite.css +60 -1
- package/styles/bootstrap5.3-lite.scss +1 -0
- package/styles/bootstrap5.3.css +70 -1
- package/styles/bootstrap5.3.scss +1 -0
- package/styles/bootstrap5.css +70 -1
- package/styles/bootstrap5.scss +1 -0
- package/styles/fabric-dark-lite.css +60 -1
- package/styles/fabric-dark-lite.scss +1 -0
- package/styles/fabric-dark.css +70 -1
- package/styles/fabric-dark.scss +1 -0
- package/styles/fabric-lite.css +60 -1
- package/styles/fabric-lite.scss +1 -0
- package/styles/fabric.css +70 -1
- package/styles/fabric.scss +1 -0
- package/styles/fluent-dark-lite.css +60 -1
- package/styles/fluent-dark-lite.scss +1 -0
- package/styles/fluent-dark.css +70 -1
- package/styles/fluent-dark.scss +1 -0
- package/styles/fluent-lite.css +60 -1
- package/styles/fluent-lite.scss +1 -0
- package/styles/fluent.css +70 -1
- package/styles/fluent.scss +1 -0
- package/styles/fluent2-lite.css +60 -1
- package/styles/fluent2-lite.scss +1 -0
- package/styles/fluent2.css +70 -1
- package/styles/fluent2.scss +1 -0
- package/styles/highcontrast-light-lite.css +60 -1
- package/styles/highcontrast-light-lite.scss +1 -0
- package/styles/highcontrast-light.css +70 -1
- package/styles/highcontrast-light.scss +1 -0
- package/styles/highcontrast-lite.css +60 -1
- package/styles/highcontrast-lite.scss +1 -0
- package/styles/highcontrast.css +70 -1
- package/styles/highcontrast.scss +1 -0
- package/styles/material-dark-lite.css +60 -1
- package/styles/material-dark-lite.scss +1 -0
- package/styles/material-dark.css +70 -1
- package/styles/material-dark.scss +1 -0
- package/styles/material-lite.css +60 -1
- package/styles/material-lite.scss +1 -0
- package/styles/material.css +70 -1
- package/styles/material.scss +1 -0
- package/styles/material3-dark-lite.css +60 -1
- package/styles/material3-dark-lite.scss +1 -0
- package/styles/material3-dark.css +70 -1
- package/styles/material3-dark.scss +1 -0
- package/styles/material3-lite.css +60 -1
- package/styles/material3-lite.scss +1 -0
- package/styles/material3.css +70 -1
- package/styles/material3.scss +1 -0
- package/styles/multicolumn-combobox/_bigger.scss +9 -0
- package/styles/multicolumn-combobox/_layout.scss +16 -1
- package/styles/multicolumn-combobox/bds.css +70 -1
- package/styles/multicolumn-combobox/bds.scss +1 -0
- package/styles/multicolumn-combobox/bootstrap-dark.css +70 -1
- package/styles/multicolumn-combobox/bootstrap-dark.scss +1 -0
- package/styles/multicolumn-combobox/bootstrap.css +70 -1
- package/styles/multicolumn-combobox/bootstrap.scss +1 -0
- package/styles/multicolumn-combobox/bootstrap4.css +70 -1
- package/styles/multicolumn-combobox/bootstrap4.scss +1 -0
- package/styles/multicolumn-combobox/bootstrap5-dark.css +71 -2
- package/styles/multicolumn-combobox/bootstrap5-dark.scss +1 -0
- package/styles/multicolumn-combobox/bootstrap5.3.css +70 -1
- package/styles/multicolumn-combobox/bootstrap5.3.scss +1 -0
- package/styles/multicolumn-combobox/bootstrap5.css +70 -1
- package/styles/multicolumn-combobox/bootstrap5.scss +1 -0
- package/styles/multicolumn-combobox/fabric-dark.css +70 -1
- package/styles/multicolumn-combobox/fabric-dark.scss +1 -0
- package/styles/multicolumn-combobox/fabric.css +70 -1
- package/styles/multicolumn-combobox/fabric.scss +1 -0
- package/styles/multicolumn-combobox/fluent-dark.css +70 -1
- package/styles/multicolumn-combobox/fluent-dark.scss +1 -0
- package/styles/multicolumn-combobox/fluent.css +70 -1
- package/styles/multicolumn-combobox/fluent.scss +1 -0
- package/styles/multicolumn-combobox/fluent2.css +70 -1
- package/styles/multicolumn-combobox/fluent2.scss +1 -0
- package/styles/multicolumn-combobox/highcontrast-light.css +70 -1
- package/styles/multicolumn-combobox/highcontrast-light.scss +1 -0
- package/styles/multicolumn-combobox/highcontrast.css +70 -1
- package/styles/multicolumn-combobox/highcontrast.scss +1 -0
- package/styles/multicolumn-combobox/material-dark.css +70 -1
- package/styles/multicolumn-combobox/material-dark.scss +1 -0
- package/styles/multicolumn-combobox/material.css +70 -1
- package/styles/multicolumn-combobox/material.scss +1 -0
- package/styles/multicolumn-combobox/material3-dark.css +70 -1
- package/styles/multicolumn-combobox/material3-dark.scss +1 -0
- package/styles/multicolumn-combobox/material3.css +70 -1
- package/styles/multicolumn-combobox/material3.scss +1 -0
- package/styles/multicolumn-combobox/tailwind-dark.css +72 -3
- package/styles/multicolumn-combobox/tailwind-dark.scss +1 -0
- package/styles/multicolumn-combobox/tailwind.css +70 -1
- package/styles/multicolumn-combobox/tailwind.scss +1 -0
- package/styles/multicolumn-combobox/tailwind3.css +70 -1
- package/styles/multicolumn-combobox/tailwind3.scss +1 -0
- package/styles/tailwind-dark-lite.css +62 -3
- package/styles/tailwind-dark-lite.scss +1 -0
- package/styles/tailwind-dark.css +72 -3
- package/styles/tailwind-dark.scss +1 -0
- package/styles/tailwind-lite.css +60 -1
- package/styles/tailwind-lite.scss +1 -0
- package/styles/tailwind.css +70 -1
- package/styles/tailwind.scss +1 -0
- package/styles/tailwind3-lite.css +60 -1
- package/styles/tailwind3-lite.scss +1 -0
- package/styles/tailwind3.css +70 -1
- package/styles/tailwind3.scss +1 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Property, ChildProperty, Event, getUniqueID, isNullOrUndefined, addClass, removeClass, formatUnit, getValue, attributes,
|
|
1
|
+
import { Property, ChildProperty, Event, getUniqueID, isNullOrUndefined, addClass, removeClass, prepend, formatUnit, getValue, attributes, Browser, append, L10n, select, compile, EventHandler, KeyboardEvents, closest, Animation, detach, Complex, Collection, NotifyPropertyChanges, Component } from '@syncfusion/ej2-base';
|
|
2
2
|
import { Input } from '@syncfusion/ej2-inputs';
|
|
3
3
|
import { DataManager, Query } from '@syncfusion/ej2-data';
|
|
4
|
-
import { Popup } from '@syncfusion/ej2-popups';
|
|
4
|
+
import { showSpinner, hideSpinner, createSpinner, Popup } from '@syncfusion/ej2-popups';
|
|
5
5
|
import { Grid, VirtualScroll, Group, Edit, Sort, Resize } from '@syncfusion/ej2-grids';
|
|
6
6
|
|
|
7
7
|
var __extends = (undefined && undefined.__extends) || (function () {
|
|
@@ -65,6 +65,7 @@ var NODATA = 'e-nodata';
|
|
|
65
65
|
var DISABLED = 'e-disabled';
|
|
66
66
|
var INPUTFOCUS = 'e-input-focus';
|
|
67
67
|
var MULTICOLUMNLIST = 'e-multicolumn-list';
|
|
68
|
+
var HIDDENELEMENT = 'e-multicolumn-list-hidden';
|
|
68
69
|
var MULTICOLUMNGRID = 'e-multicolumn-grid';
|
|
69
70
|
var MultiColumnGrid = /** @__PURE__ @class */ (function () {
|
|
70
71
|
function MultiColumnGrid() {
|
|
@@ -265,6 +266,7 @@ var MultiColumnComboBox = /** @__PURE__ @class */ (function (_super) {
|
|
|
265
266
|
function MultiColumnComboBox(options, element) {
|
|
266
267
|
var _this = _super.call(this, options, element) || this;
|
|
267
268
|
_this.gridInject = new MultiColumnGrid();
|
|
269
|
+
_this.isShowSpinner = true;
|
|
268
270
|
_this.gridInject.InjectModules();
|
|
269
271
|
return _this;
|
|
270
272
|
}
|
|
@@ -324,14 +326,32 @@ var MultiColumnComboBox = /** @__PURE__ @class */ (function (_super) {
|
|
|
324
326
|
}
|
|
325
327
|
};
|
|
326
328
|
MultiColumnComboBox.prototype.render = function () {
|
|
327
|
-
this.renderGrid();
|
|
328
329
|
this.renderInput();
|
|
330
|
+
this.renderGrid();
|
|
329
331
|
this.popupDiv = this.createElement('div', { className: CONTENT });
|
|
330
332
|
this.popupDiv.appendChild(this.gridEle);
|
|
331
333
|
this.setHTMLAttributes();
|
|
332
334
|
this.renderPopup();
|
|
333
335
|
this.wireEvents();
|
|
334
336
|
};
|
|
337
|
+
MultiColumnComboBox.prototype.setHiddenValue = function () {
|
|
338
|
+
if (isNullOrUndefined(this.value)) {
|
|
339
|
+
this.hiddenElement.innerHTML = '';
|
|
340
|
+
return;
|
|
341
|
+
}
|
|
342
|
+
var existingOption = this.hiddenElement.querySelector('option');
|
|
343
|
+
if (!isNullOrUndefined(existingOption)) {
|
|
344
|
+
existingOption.textContent = this.text;
|
|
345
|
+
existingOption.setAttribute('value', this.value.toString());
|
|
346
|
+
}
|
|
347
|
+
else if (!isNullOrUndefined(this.hiddenElement)) {
|
|
348
|
+
var newOption = document.createElement('option');
|
|
349
|
+
newOption.text = this.text;
|
|
350
|
+
newOption.setAttribute('value', this.value.toString());
|
|
351
|
+
newOption.setAttribute('selected', '');
|
|
352
|
+
this.hiddenElement.appendChild(newOption);
|
|
353
|
+
}
|
|
354
|
+
};
|
|
335
355
|
MultiColumnComboBox.prototype.renderGrid = function () {
|
|
336
356
|
var _this = this;
|
|
337
357
|
var gridColumns = this.getGridColumns();
|
|
@@ -354,6 +374,12 @@ var MultiColumnComboBox = /** @__PURE__ @class */ (function (_super) {
|
|
|
354
374
|
allowResizing: this.gridSettings.allowResizing,
|
|
355
375
|
allowMultiSorting: this.sortType.toString().toLowerCase() === 'multiplecolumns' && this.allowSorting,
|
|
356
376
|
rowTemplate: this.itemTemplate,
|
|
377
|
+
beforeDataBound: function () {
|
|
378
|
+
if (_this.dataSource instanceof DataManager && _this.isShowSpinner) {
|
|
379
|
+
_this.showHideSpinner(true);
|
|
380
|
+
_this.isShowSpinner = false;
|
|
381
|
+
}
|
|
382
|
+
},
|
|
357
383
|
dataBound: function () { _this.onDataBound(); },
|
|
358
384
|
actionFailure: function (args) { _this.onActionFailure(args); },
|
|
359
385
|
actionBegin: function (args) { _this.trigger('actionBegin', args); },
|
|
@@ -375,7 +401,7 @@ var MultiColumnComboBox = /** @__PURE__ @class */ (function (_super) {
|
|
|
375
401
|
}
|
|
376
402
|
}
|
|
377
403
|
});
|
|
378
|
-
this.gridEle = this.createElement('div', { id: getUniqueID('grid'), className: MULTICOLUMNGRID });
|
|
404
|
+
this.gridEle = this.createElement('div', { id: this.element.id + "_" + getUniqueID('grid'), className: MULTICOLUMNGRID });
|
|
379
405
|
this.updateGroupByField();
|
|
380
406
|
if (gridColumns.length > 0) {
|
|
381
407
|
// Set first column as primary key to avoid PRIMARY KEY MISSING warning.
|
|
@@ -386,12 +412,28 @@ var MultiColumnComboBox = /** @__PURE__ @class */ (function (_super) {
|
|
|
386
412
|
SortOrder.Ascending : SortOrder.Descending }] };
|
|
387
413
|
}
|
|
388
414
|
this.gridObj.appendTo(this.gridEle);
|
|
415
|
+
if (!isNullOrUndefined(this.value) || !isNullOrUndefined(this.text) || !isNullOrUndefined(this.index)) {
|
|
416
|
+
this.initValue(null, null, true);
|
|
417
|
+
}
|
|
389
418
|
};
|
|
390
419
|
MultiColumnComboBox.prototype.handleActionComplete = function (args) {
|
|
420
|
+
var _this = this;
|
|
391
421
|
this.trigger('actionComplete', args);
|
|
392
422
|
if (args.requestType === 'sorting') {
|
|
393
423
|
this.updateRowSelection(args);
|
|
394
424
|
}
|
|
425
|
+
if (Array.isArray(args.rows) && this.isDataFiltered) {
|
|
426
|
+
var rows = args.rows;
|
|
427
|
+
var rowHeight_1 = 0;
|
|
428
|
+
rows.forEach(function (row) {
|
|
429
|
+
var rowElement = _this.gridObj.getRowElementByUID(row.uid);
|
|
430
|
+
if (rowElement) {
|
|
431
|
+
rowHeight_1 += rowElement.getBoundingClientRect().height;
|
|
432
|
+
}
|
|
433
|
+
});
|
|
434
|
+
this.popupRowHeight = rowHeight_1 || parseFloat(this.popupHeight);
|
|
435
|
+
this.updateGridHeight(true, true);
|
|
436
|
+
}
|
|
395
437
|
this.popupObj.refreshPosition();
|
|
396
438
|
this.gridObj.element.querySelector('.e-content').scrollTop = 0;
|
|
397
439
|
};
|
|
@@ -500,6 +542,7 @@ var MultiColumnComboBox = /** @__PURE__ @class */ (function (_super) {
|
|
|
500
542
|
}
|
|
501
543
|
};
|
|
502
544
|
MultiColumnComboBox.prototype.onDataBound = function () {
|
|
545
|
+
var _this = this;
|
|
503
546
|
var dataCount = this.dataSource.length;
|
|
504
547
|
var popupChild = this.popupDiv.querySelector('.' + MULTICOLUMNGRID);
|
|
505
548
|
var hasNoDataClass = this.popupDiv.classList.contains(NODATA);
|
|
@@ -530,6 +573,19 @@ var MultiColumnComboBox = /** @__PURE__ @class */ (function (_super) {
|
|
|
530
573
|
var firstRowEle = rowElements[0];
|
|
531
574
|
firstRowEle.classList.add('e-row-focus');
|
|
532
575
|
}
|
|
576
|
+
if (this.dataSource instanceof DataManager) {
|
|
577
|
+
setTimeout(function () {
|
|
578
|
+
_this.showHideSpinner(false);
|
|
579
|
+
});
|
|
580
|
+
}
|
|
581
|
+
};
|
|
582
|
+
MultiColumnComboBox.prototype.showHideSpinner = function (isShow) {
|
|
583
|
+
if (isShow) {
|
|
584
|
+
showSpinner(this.dropdownElement);
|
|
585
|
+
}
|
|
586
|
+
else {
|
|
587
|
+
hideSpinner(this.dropdownElement);
|
|
588
|
+
}
|
|
533
589
|
};
|
|
534
590
|
MultiColumnComboBox.prototype.onActionFailure = function (args) {
|
|
535
591
|
this.trigger('actionFailure', args);
|
|
@@ -585,13 +641,28 @@ var MultiColumnComboBox = /** @__PURE__ @class */ (function (_super) {
|
|
|
585
641
|
this.inputWrapper = this.inputObj.container;
|
|
586
642
|
this.inputWrapper.classList.add(MULTICOLUMNLIST);
|
|
587
643
|
this.inputWrapper.setAttribute('spellcheck', 'false');
|
|
644
|
+
this.hiddenElement = this.createElement('select', {
|
|
645
|
+
attrs: {
|
|
646
|
+
'aria-hidden': 'true',
|
|
647
|
+
'tabindex': '-1',
|
|
648
|
+
'class': HIDDENELEMENT
|
|
649
|
+
}
|
|
650
|
+
});
|
|
651
|
+
prepend([this.hiddenElement], this.inputWrapper);
|
|
652
|
+
var name = this.inputEle.getAttribute('name') ? this.inputEle.getAttribute('name') : this.inputEle.getAttribute('id');
|
|
653
|
+
this.hiddenElement.setAttribute('name', name);
|
|
654
|
+
this.inputEle.removeAttribute('name');
|
|
655
|
+
if (!this.hiddenElement.hasAttribute('aria-label')) {
|
|
656
|
+
this.hiddenElement.setAttribute('aria-label', this.getModuleName());
|
|
657
|
+
}
|
|
588
658
|
if (this.element.tagName === this.getDirective()) {
|
|
589
659
|
this.element.appendChild(this.inputWrapper);
|
|
590
660
|
}
|
|
591
661
|
this.setElementWidth(this.width);
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
662
|
+
this.dropdownElement = this.inputWrapper.querySelector('.e-input-group-icon.e-multicolumn-list-icon.e-icons');
|
|
663
|
+
createSpinner({
|
|
664
|
+
target: this.dropdownElement
|
|
665
|
+
});
|
|
595
666
|
};
|
|
596
667
|
MultiColumnComboBox.prototype.setElementWidth = function (inputWidth) {
|
|
597
668
|
if (isNullOrUndefined(inputWidth)) {
|
|
@@ -606,6 +677,7 @@ var MultiColumnComboBox = /** @__PURE__ @class */ (function (_super) {
|
|
|
606
677
|
}
|
|
607
678
|
};
|
|
608
679
|
MultiColumnComboBox.prototype.setHTMLAttributes = function () {
|
|
680
|
+
var _this = this;
|
|
609
681
|
var htmlAttributes = this.htmlAttributes;
|
|
610
682
|
var inputEle = this.inputEle;
|
|
611
683
|
if (Object.keys(htmlAttributes).length) {
|
|
@@ -623,12 +695,26 @@ var MultiColumnComboBox = /** @__PURE__ @class */ (function (_super) {
|
|
|
623
695
|
this.setProperties({ readonly: true }, true);
|
|
624
696
|
this.dataBind();
|
|
625
697
|
break;
|
|
626
|
-
case 'style':
|
|
627
|
-
|
|
698
|
+
case 'style': {
|
|
699
|
+
var styles = htmlAttributes[htmlAttr];
|
|
700
|
+
this.inputWrapper.style.cssText = '';
|
|
701
|
+
if (styles) {
|
|
702
|
+
styles.split(';').forEach(function (styleProperty) {
|
|
703
|
+
var _a = styleProperty.split(':').map(function (part) { return part.trim(); }), property = _a[0], value = _a[1];
|
|
704
|
+
if (property && value) {
|
|
705
|
+
_this.inputWrapper.style.setProperty(property, value);
|
|
706
|
+
}
|
|
707
|
+
});
|
|
708
|
+
}
|
|
628
709
|
break;
|
|
710
|
+
}
|
|
629
711
|
default: {
|
|
630
712
|
var defaultAttr = ['title', 'id', 'placeholder', 'role', 'autocomplete', 'autocapitalize', 'spellcheck', 'minlength', 'maxlength'];
|
|
631
|
-
|
|
713
|
+
var validateAttr = ['name', 'required'];
|
|
714
|
+
if (validateAttr.indexOf(htmlAttr) > -1 || htmlAttr.indexOf('data') === 0) {
|
|
715
|
+
this.hiddenElement.setAttribute(htmlAttr, this.htmlAttributes["" + htmlAttr]);
|
|
716
|
+
}
|
|
717
|
+
else if (defaultAttr.indexOf(htmlAttr) > -1) {
|
|
632
718
|
if (htmlAttr === 'placeholder') {
|
|
633
719
|
Input.setPlaceholder(htmlAttributes[htmlAttr], inputEle);
|
|
634
720
|
}
|
|
@@ -803,7 +889,6 @@ var MultiColumnComboBox = /** @__PURE__ @class */ (function (_super) {
|
|
|
803
889
|
var popupHeight = this.getSize(false);
|
|
804
890
|
this.popupEle.style.maxHeight = popupHeight;
|
|
805
891
|
if (this.footerTemplate) {
|
|
806
|
-
this.footer = this.footer ? this.footer : this.popupEle.querySelector('.e-popup-footer');
|
|
807
892
|
var height = Math.round(this.footer.getBoundingClientRect().height);
|
|
808
893
|
popupHeight = formatUnit(parseInt(popupHeight, 10) - height + 'px');
|
|
809
894
|
}
|
|
@@ -812,16 +897,15 @@ var MultiColumnComboBox = /** @__PURE__ @class */ (function (_super) {
|
|
|
812
897
|
this.popupEle.style.visibility = 'hidden';
|
|
813
898
|
this.isInitialRender = true;
|
|
814
899
|
};
|
|
815
|
-
MultiColumnComboBox.prototype.updateGridHeight = function (isFilter, autoHeight
|
|
900
|
+
MultiColumnComboBox.prototype.updateGridHeight = function (isFilter, autoHeight) {
|
|
816
901
|
var height;
|
|
817
902
|
if (isFilter) {
|
|
818
903
|
var gridContentEle = this.gridObj.getContent().querySelector('.e-content');
|
|
819
904
|
var scrollBarHeight = gridContentEle.offsetHeight - gridContentEle.clientHeight;
|
|
820
|
-
var totalRowHeight = dataSourceCount * this.popupRowHeight;
|
|
821
905
|
if (this.fields.groupBy !== '' && !isNullOrUndefined(this.fields.groupBy)) {
|
|
822
|
-
|
|
906
|
+
this.popupRowHeight += this.popupRowHeight;
|
|
823
907
|
}
|
|
824
|
-
height = autoHeight ? (
|
|
908
|
+
height = autoHeight ? (this.popupRowHeight < this.prevGridHeight ? (this.popupRowHeight + scrollBarHeight) + 'px' : this.prevGridHeight + 'px') : this.prevGridHeight + 'px';
|
|
825
909
|
}
|
|
826
910
|
else {
|
|
827
911
|
this.prevGridHeight = this.popupDiv.getBoundingClientRect().height - this.popupDiv.querySelector('.e-gridheader').getBoundingClientRect().height;
|
|
@@ -978,6 +1062,7 @@ var MultiColumnComboBox = /** @__PURE__ @class */ (function (_super) {
|
|
|
978
1062
|
_this.updateValues(selectedRecords ? dataValue : '', selectedRecords ? dataText : '', _this.gridObj.selectedRowIndex, ChangeEventArgs);
|
|
979
1063
|
}
|
|
980
1064
|
Input.setValue(selectedRecords ? dataText : '', _this.inputEle, _this.floatLabelType, _this.showClearButton);
|
|
1065
|
+
_this.setHiddenValue();
|
|
981
1066
|
if (!isKeyNav || (isKeyNav && isUpdateVal)) {
|
|
982
1067
|
_this.hidePopup(e);
|
|
983
1068
|
}
|
|
@@ -992,6 +1077,7 @@ var MultiColumnComboBox = /** @__PURE__ @class */ (function (_super) {
|
|
|
992
1077
|
this.value = value || this.value;
|
|
993
1078
|
this.index = this.selectedRowIndex = !isNullOrUndefined(index) ? index : this.index;
|
|
994
1079
|
this.isProtectedOnChange = prevOnChange;
|
|
1080
|
+
this.setHiddenValue();
|
|
995
1081
|
if (!isInitial) {
|
|
996
1082
|
this.triggerChangeEvent(eventArgs);
|
|
997
1083
|
}
|
|
@@ -1119,9 +1205,8 @@ var MultiColumnComboBox = /** @__PURE__ @class */ (function (_super) {
|
|
|
1119
1205
|
dataSource.executeQuery(query).then(function (e) {
|
|
1120
1206
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1121
1207
|
var dataLists = e.result;
|
|
1122
|
-
var dataLength = dataLists.length;
|
|
1123
1208
|
filteredData = dataLists.filter(function (item) { return _this.filterData(item, filterType, inputValue, fields); });
|
|
1124
|
-
_this.updateGridDataSource(filteredData
|
|
1209
|
+
_this.updateGridDataSource(filteredData);
|
|
1125
1210
|
});
|
|
1126
1211
|
};
|
|
1127
1212
|
MultiColumnComboBox.prototype.filterData = function (item, filterType, inputValue, fields) {
|
|
@@ -1138,12 +1223,8 @@ var MultiColumnComboBox = /** @__PURE__ @class */ (function (_super) {
|
|
|
1138
1223
|
return false;
|
|
1139
1224
|
}
|
|
1140
1225
|
};
|
|
1141
|
-
MultiColumnComboBox.prototype.updateGridDataSource = function (dataSource
|
|
1142
|
-
var autoHeight = true;
|
|
1226
|
+
MultiColumnComboBox.prototype.updateGridDataSource = function (dataSource) {
|
|
1143
1227
|
if (dataSource.length > 0) {
|
|
1144
|
-
var length_1 = this.dataSource instanceof DataManager ? dataLength
|
|
1145
|
-
: this.dataSource.length;
|
|
1146
|
-
autoHeight = length_1 !== dataSource.length;
|
|
1147
1228
|
removeClass([this.popupDiv], [NODATA]);
|
|
1148
1229
|
var noRecordEle = this.popupDiv.querySelector('.e-no-records');
|
|
1149
1230
|
if (noRecordEle) {
|
|
@@ -1156,7 +1237,6 @@ var MultiColumnComboBox = /** @__PURE__ @class */ (function (_super) {
|
|
|
1156
1237
|
this.l10nUpdate();
|
|
1157
1238
|
addClass([this.popupDiv], [NODATA]);
|
|
1158
1239
|
}
|
|
1159
|
-
this.updateGridHeight(true, autoHeight, dataSource.length);
|
|
1160
1240
|
};
|
|
1161
1241
|
MultiColumnComboBox.prototype.wireEvents = function () {
|
|
1162
1242
|
if (!isNullOrUndefined(this.inputObj.buttons[0])) {
|
|
@@ -1438,6 +1518,7 @@ var MultiColumnComboBox = /** @__PURE__ @class */ (function (_super) {
|
|
|
1438
1518
|
MultiColumnComboBox.prototype.updateDynamicDataSource = function (newDataSource, oldDataSource) {
|
|
1439
1519
|
if (this.gridObj) {
|
|
1440
1520
|
var dataLength_1;
|
|
1521
|
+
this.isShowSpinner = true;
|
|
1441
1522
|
this.gridObj.dataSource = newDataSource;
|
|
1442
1523
|
var isRemoteData = oldDataSource instanceof DataManager;
|
|
1443
1524
|
if (isRemoteData) {
|
|
@@ -1517,7 +1598,6 @@ var MultiColumnComboBox = /** @__PURE__ @class */ (function (_super) {
|
|
|
1517
1598
|
if ((_this.value || _this.text || _this.index)) {
|
|
1518
1599
|
_this.gridObj.selectRow(_this.selectedRowIndex);
|
|
1519
1600
|
}
|
|
1520
|
-
_this.focusIn(e);
|
|
1521
1601
|
}
|
|
1522
1602
|
var contentEle = _this.gridObj.getContent();
|
|
1523
1603
|
if (contentEle) {
|
|
@@ -1676,6 +1756,8 @@ var MultiColumnComboBox = /** @__PURE__ @class */ (function (_super) {
|
|
|
1676
1756
|
this.popupEle = null;
|
|
1677
1757
|
this.footer = null;
|
|
1678
1758
|
this.noRecord = null;
|
|
1759
|
+
this.hiddenElement = null;
|
|
1760
|
+
this.dropdownElement = null;
|
|
1679
1761
|
_super.prototype.destroy.call(this);
|
|
1680
1762
|
};
|
|
1681
1763
|
/**
|