@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 { ChildProperty, Property, Event, Component, getUniqueID, isNullOrUndefined, addClass, removeClass, formatUnit, getValue, attributes,
|
|
1
|
+
import { ChildProperty, Property, Event, Component, getUniqueID, isNullOrUndefined, addClass, removeClass, prepend, formatUnit, getValue, attributes, Browser, append, L10n, select, compile, EventHandler, KeyboardEvents, closest, Animation, detach, Complex, Collection, NotifyPropertyChanges } 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 __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
@@ -25,6 +25,7 @@ const NODATA = 'e-nodata';
|
|
|
25
25
|
const DISABLED = 'e-disabled';
|
|
26
26
|
const INPUTFOCUS = 'e-input-focus';
|
|
27
27
|
const MULTICOLUMNLIST = 'e-multicolumn-list';
|
|
28
|
+
const HIDDENELEMENT = 'e-multicolumn-list-hidden';
|
|
28
29
|
const MULTICOLUMNGRID = 'e-multicolumn-grid';
|
|
29
30
|
class MultiColumnGrid {
|
|
30
31
|
/**
|
|
@@ -206,6 +207,7 @@ let MultiColumnComboBox = class MultiColumnComboBox extends Component {
|
|
|
206
207
|
constructor(options, element) {
|
|
207
208
|
super(options, element);
|
|
208
209
|
this.gridInject = new MultiColumnGrid();
|
|
210
|
+
this.isShowSpinner = true;
|
|
209
211
|
this.gridInject.InjectModules();
|
|
210
212
|
}
|
|
211
213
|
/**
|
|
@@ -264,14 +266,32 @@ let MultiColumnComboBox = class MultiColumnComboBox extends Component {
|
|
|
264
266
|
}
|
|
265
267
|
}
|
|
266
268
|
render() {
|
|
267
|
-
this.renderGrid();
|
|
268
269
|
this.renderInput();
|
|
270
|
+
this.renderGrid();
|
|
269
271
|
this.popupDiv = this.createElement('div', { className: CONTENT });
|
|
270
272
|
this.popupDiv.appendChild(this.gridEle);
|
|
271
273
|
this.setHTMLAttributes();
|
|
272
274
|
this.renderPopup();
|
|
273
275
|
this.wireEvents();
|
|
274
276
|
}
|
|
277
|
+
setHiddenValue() {
|
|
278
|
+
if (isNullOrUndefined(this.value)) {
|
|
279
|
+
this.hiddenElement.innerHTML = '';
|
|
280
|
+
return;
|
|
281
|
+
}
|
|
282
|
+
const existingOption = this.hiddenElement.querySelector('option');
|
|
283
|
+
if (!isNullOrUndefined(existingOption)) {
|
|
284
|
+
existingOption.textContent = this.text;
|
|
285
|
+
existingOption.setAttribute('value', this.value.toString());
|
|
286
|
+
}
|
|
287
|
+
else if (!isNullOrUndefined(this.hiddenElement)) {
|
|
288
|
+
const newOption = document.createElement('option');
|
|
289
|
+
newOption.text = this.text;
|
|
290
|
+
newOption.setAttribute('value', this.value.toString());
|
|
291
|
+
newOption.setAttribute('selected', '');
|
|
292
|
+
this.hiddenElement.appendChild(newOption);
|
|
293
|
+
}
|
|
294
|
+
}
|
|
275
295
|
renderGrid() {
|
|
276
296
|
const gridColumns = this.getGridColumns();
|
|
277
297
|
const sortOrder = this.sortOrder.toString().toLowerCase();
|
|
@@ -293,6 +313,12 @@ let MultiColumnComboBox = class MultiColumnComboBox extends Component {
|
|
|
293
313
|
allowResizing: this.gridSettings.allowResizing,
|
|
294
314
|
allowMultiSorting: this.sortType.toString().toLowerCase() === 'multiplecolumns' && this.allowSorting,
|
|
295
315
|
rowTemplate: this.itemTemplate,
|
|
316
|
+
beforeDataBound: () => {
|
|
317
|
+
if (this.dataSource instanceof DataManager && this.isShowSpinner) {
|
|
318
|
+
this.showHideSpinner(true);
|
|
319
|
+
this.isShowSpinner = false;
|
|
320
|
+
}
|
|
321
|
+
},
|
|
296
322
|
dataBound: () => { this.onDataBound(); },
|
|
297
323
|
actionFailure: (args) => { this.onActionFailure(args); },
|
|
298
324
|
actionBegin: (args) => { this.trigger('actionBegin', args); },
|
|
@@ -314,7 +340,7 @@ let MultiColumnComboBox = class MultiColumnComboBox extends Component {
|
|
|
314
340
|
}
|
|
315
341
|
}
|
|
316
342
|
});
|
|
317
|
-
this.gridEle = this.createElement('div', { id: getUniqueID('grid')
|
|
343
|
+
this.gridEle = this.createElement('div', { id: `${this.element.id}_${getUniqueID('grid')}`, className: MULTICOLUMNGRID });
|
|
318
344
|
this.updateGroupByField();
|
|
319
345
|
if (gridColumns.length > 0) {
|
|
320
346
|
// Set first column as primary key to avoid PRIMARY KEY MISSING warning.
|
|
@@ -325,12 +351,27 @@ let MultiColumnComboBox = class MultiColumnComboBox extends Component {
|
|
|
325
351
|
SortOrder.Ascending : SortOrder.Descending }] };
|
|
326
352
|
}
|
|
327
353
|
this.gridObj.appendTo(this.gridEle);
|
|
354
|
+
if (!isNullOrUndefined(this.value) || !isNullOrUndefined(this.text) || !isNullOrUndefined(this.index)) {
|
|
355
|
+
this.initValue(null, null, true);
|
|
356
|
+
}
|
|
328
357
|
}
|
|
329
358
|
handleActionComplete(args) {
|
|
330
359
|
this.trigger('actionComplete', args);
|
|
331
360
|
if (args.requestType === 'sorting') {
|
|
332
361
|
this.updateRowSelection(args);
|
|
333
362
|
}
|
|
363
|
+
if (Array.isArray(args.rows) && this.isDataFiltered) {
|
|
364
|
+
const rows = args.rows;
|
|
365
|
+
let rowHeight = 0;
|
|
366
|
+
rows.forEach((row) => {
|
|
367
|
+
const rowElement = this.gridObj.getRowElementByUID(row.uid);
|
|
368
|
+
if (rowElement) {
|
|
369
|
+
rowHeight += rowElement.getBoundingClientRect().height;
|
|
370
|
+
}
|
|
371
|
+
});
|
|
372
|
+
this.popupRowHeight = rowHeight || parseFloat(this.popupHeight);
|
|
373
|
+
this.updateGridHeight(true, true);
|
|
374
|
+
}
|
|
334
375
|
this.popupObj.refreshPosition();
|
|
335
376
|
this.gridObj.element.querySelector('.e-content').scrollTop = 0;
|
|
336
377
|
}
|
|
@@ -464,6 +505,19 @@ let MultiColumnComboBox = class MultiColumnComboBox extends Component {
|
|
|
464
505
|
const firstRowEle = rowElements[0];
|
|
465
506
|
firstRowEle.classList.add('e-row-focus');
|
|
466
507
|
}
|
|
508
|
+
if (this.dataSource instanceof DataManager) {
|
|
509
|
+
setTimeout(() => {
|
|
510
|
+
this.showHideSpinner(false);
|
|
511
|
+
});
|
|
512
|
+
}
|
|
513
|
+
}
|
|
514
|
+
showHideSpinner(isShow) {
|
|
515
|
+
if (isShow) {
|
|
516
|
+
showSpinner(this.dropdownElement);
|
|
517
|
+
}
|
|
518
|
+
else {
|
|
519
|
+
hideSpinner(this.dropdownElement);
|
|
520
|
+
}
|
|
467
521
|
}
|
|
468
522
|
onActionFailure(args) {
|
|
469
523
|
this.trigger('actionFailure', args);
|
|
@@ -519,13 +573,28 @@ let MultiColumnComboBox = class MultiColumnComboBox extends Component {
|
|
|
519
573
|
this.inputWrapper = this.inputObj.container;
|
|
520
574
|
this.inputWrapper.classList.add(MULTICOLUMNLIST);
|
|
521
575
|
this.inputWrapper.setAttribute('spellcheck', 'false');
|
|
576
|
+
this.hiddenElement = this.createElement('select', {
|
|
577
|
+
attrs: {
|
|
578
|
+
'aria-hidden': 'true',
|
|
579
|
+
'tabindex': '-1',
|
|
580
|
+
'class': HIDDENELEMENT
|
|
581
|
+
}
|
|
582
|
+
});
|
|
583
|
+
prepend([this.hiddenElement], this.inputWrapper);
|
|
584
|
+
const name = this.inputEle.getAttribute('name') ? this.inputEle.getAttribute('name') : this.inputEle.getAttribute('id');
|
|
585
|
+
this.hiddenElement.setAttribute('name', name);
|
|
586
|
+
this.inputEle.removeAttribute('name');
|
|
587
|
+
if (!this.hiddenElement.hasAttribute('aria-label')) {
|
|
588
|
+
this.hiddenElement.setAttribute('aria-label', this.getModuleName());
|
|
589
|
+
}
|
|
522
590
|
if (this.element.tagName === this.getDirective()) {
|
|
523
591
|
this.element.appendChild(this.inputWrapper);
|
|
524
592
|
}
|
|
525
593
|
this.setElementWidth(this.width);
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
594
|
+
this.dropdownElement = this.inputWrapper.querySelector('.e-input-group-icon.e-multicolumn-list-icon.e-icons');
|
|
595
|
+
createSpinner({
|
|
596
|
+
target: this.dropdownElement
|
|
597
|
+
});
|
|
529
598
|
}
|
|
530
599
|
setElementWidth(inputWidth) {
|
|
531
600
|
if (isNullOrUndefined(inputWidth)) {
|
|
@@ -556,12 +625,26 @@ let MultiColumnComboBox = class MultiColumnComboBox extends Component {
|
|
|
556
625
|
this.setProperties({ readonly: true }, true);
|
|
557
626
|
this.dataBind();
|
|
558
627
|
break;
|
|
559
|
-
case 'style':
|
|
560
|
-
|
|
628
|
+
case 'style': {
|
|
629
|
+
const styles = htmlAttributes[htmlAttr];
|
|
630
|
+
this.inputWrapper.style.cssText = '';
|
|
631
|
+
if (styles) {
|
|
632
|
+
styles.split(';').forEach((styleProperty) => {
|
|
633
|
+
const [property, value] = styleProperty.split(':').map((part) => part.trim());
|
|
634
|
+
if (property && value) {
|
|
635
|
+
this.inputWrapper.style.setProperty(property, value);
|
|
636
|
+
}
|
|
637
|
+
});
|
|
638
|
+
}
|
|
561
639
|
break;
|
|
640
|
+
}
|
|
562
641
|
default: {
|
|
563
642
|
const defaultAttr = ['title', 'id', 'placeholder', 'role', 'autocomplete', 'autocapitalize', 'spellcheck', 'minlength', 'maxlength'];
|
|
564
|
-
|
|
643
|
+
const validateAttr = ['name', 'required'];
|
|
644
|
+
if (validateAttr.indexOf(htmlAttr) > -1 || htmlAttr.indexOf('data') === 0) {
|
|
645
|
+
this.hiddenElement.setAttribute(htmlAttr, this.htmlAttributes[`${htmlAttr}`]);
|
|
646
|
+
}
|
|
647
|
+
else if (defaultAttr.indexOf(htmlAttr) > -1) {
|
|
565
648
|
if (htmlAttr === 'placeholder') {
|
|
566
649
|
Input.setPlaceholder(htmlAttributes[htmlAttr], inputEle);
|
|
567
650
|
}
|
|
@@ -735,7 +818,6 @@ let MultiColumnComboBox = class MultiColumnComboBox extends Component {
|
|
|
735
818
|
let popupHeight = this.getSize(false);
|
|
736
819
|
this.popupEle.style.maxHeight = popupHeight;
|
|
737
820
|
if (this.footerTemplate) {
|
|
738
|
-
this.footer = this.footer ? this.footer : this.popupEle.querySelector('.e-popup-footer');
|
|
739
821
|
const height = Math.round(this.footer.getBoundingClientRect().height);
|
|
740
822
|
popupHeight = formatUnit(parseInt(popupHeight, 10) - height + 'px');
|
|
741
823
|
}
|
|
@@ -744,16 +826,15 @@ let MultiColumnComboBox = class MultiColumnComboBox extends Component {
|
|
|
744
826
|
this.popupEle.style.visibility = 'hidden';
|
|
745
827
|
this.isInitialRender = true;
|
|
746
828
|
}
|
|
747
|
-
updateGridHeight(isFilter, autoHeight
|
|
829
|
+
updateGridHeight(isFilter, autoHeight) {
|
|
748
830
|
let height;
|
|
749
831
|
if (isFilter) {
|
|
750
832
|
const gridContentEle = this.gridObj.getContent().querySelector('.e-content');
|
|
751
833
|
const scrollBarHeight = gridContentEle.offsetHeight - gridContentEle.clientHeight;
|
|
752
|
-
let totalRowHeight = dataSourceCount * this.popupRowHeight;
|
|
753
834
|
if (this.fields.groupBy !== '' && !isNullOrUndefined(this.fields.groupBy)) {
|
|
754
|
-
|
|
835
|
+
this.popupRowHeight += this.popupRowHeight;
|
|
755
836
|
}
|
|
756
|
-
height = autoHeight ? (
|
|
837
|
+
height = autoHeight ? (this.popupRowHeight < this.prevGridHeight ? (this.popupRowHeight + scrollBarHeight) + 'px' : this.prevGridHeight + 'px') : this.prevGridHeight + 'px';
|
|
757
838
|
}
|
|
758
839
|
else {
|
|
759
840
|
this.prevGridHeight = this.popupDiv.getBoundingClientRect().height - this.popupDiv.querySelector('.e-gridheader').getBoundingClientRect().height;
|
|
@@ -908,6 +989,7 @@ let MultiColumnComboBox = class MultiColumnComboBox extends Component {
|
|
|
908
989
|
this.updateValues(selectedRecords ? dataValue : '', selectedRecords ? dataText : '', this.gridObj.selectedRowIndex, ChangeEventArgs);
|
|
909
990
|
}
|
|
910
991
|
Input.setValue(selectedRecords ? dataText : '', this.inputEle, this.floatLabelType, this.showClearButton);
|
|
992
|
+
this.setHiddenValue();
|
|
911
993
|
if (!isKeyNav || (isKeyNav && isUpdateVal)) {
|
|
912
994
|
this.hidePopup(e);
|
|
913
995
|
}
|
|
@@ -922,6 +1004,7 @@ let MultiColumnComboBox = class MultiColumnComboBox extends Component {
|
|
|
922
1004
|
this.value = value || this.value;
|
|
923
1005
|
this.index = this.selectedRowIndex = !isNullOrUndefined(index) ? index : this.index;
|
|
924
1006
|
this.isProtectedOnChange = prevOnChange;
|
|
1007
|
+
this.setHiddenValue();
|
|
925
1008
|
if (!isInitial) {
|
|
926
1009
|
this.triggerChangeEvent(eventArgs);
|
|
927
1010
|
}
|
|
@@ -1034,9 +1117,8 @@ let MultiColumnComboBox = class MultiColumnComboBox extends Component {
|
|
|
1034
1117
|
dataSource.executeQuery(query).then((e) => {
|
|
1035
1118
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1036
1119
|
const dataLists = e.result;
|
|
1037
|
-
const dataLength = dataLists.length;
|
|
1038
1120
|
filteredData = dataLists.filter((item) => this.filterData(item, filterType, inputValue, fields));
|
|
1039
|
-
this.updateGridDataSource(filteredData
|
|
1121
|
+
this.updateGridDataSource(filteredData);
|
|
1040
1122
|
});
|
|
1041
1123
|
}
|
|
1042
1124
|
filterData(item, filterType, inputValue, fields) {
|
|
@@ -1053,12 +1135,8 @@ let MultiColumnComboBox = class MultiColumnComboBox extends Component {
|
|
|
1053
1135
|
return false;
|
|
1054
1136
|
}
|
|
1055
1137
|
}
|
|
1056
|
-
updateGridDataSource(dataSource
|
|
1057
|
-
let autoHeight = true;
|
|
1138
|
+
updateGridDataSource(dataSource) {
|
|
1058
1139
|
if (dataSource.length > 0) {
|
|
1059
|
-
const length = this.dataSource instanceof DataManager ? dataLength
|
|
1060
|
-
: this.dataSource.length;
|
|
1061
|
-
autoHeight = length !== dataSource.length;
|
|
1062
1140
|
removeClass([this.popupDiv], [NODATA]);
|
|
1063
1141
|
const noRecordEle = this.popupDiv.querySelector('.e-no-records');
|
|
1064
1142
|
if (noRecordEle) {
|
|
@@ -1071,7 +1149,6 @@ let MultiColumnComboBox = class MultiColumnComboBox extends Component {
|
|
|
1071
1149
|
this.l10nUpdate();
|
|
1072
1150
|
addClass([this.popupDiv], [NODATA]);
|
|
1073
1151
|
}
|
|
1074
|
-
this.updateGridHeight(true, autoHeight, dataSource.length);
|
|
1075
1152
|
}
|
|
1076
1153
|
wireEvents() {
|
|
1077
1154
|
if (!isNullOrUndefined(this.inputObj.buttons[0])) {
|
|
@@ -1349,6 +1426,7 @@ let MultiColumnComboBox = class MultiColumnComboBox extends Component {
|
|
|
1349
1426
|
updateDynamicDataSource(newDataSource, oldDataSource) {
|
|
1350
1427
|
if (this.gridObj) {
|
|
1351
1428
|
let dataLength;
|
|
1429
|
+
this.isShowSpinner = true;
|
|
1352
1430
|
this.gridObj.dataSource = newDataSource;
|
|
1353
1431
|
const isRemoteData = oldDataSource instanceof DataManager;
|
|
1354
1432
|
if (isRemoteData) {
|
|
@@ -1427,7 +1505,6 @@ let MultiColumnComboBox = class MultiColumnComboBox extends Component {
|
|
|
1427
1505
|
if ((this.value || this.text || this.index)) {
|
|
1428
1506
|
this.gridObj.selectRow(this.selectedRowIndex);
|
|
1429
1507
|
}
|
|
1430
|
-
this.focusIn(e);
|
|
1431
1508
|
}
|
|
1432
1509
|
const contentEle = this.gridObj.getContent();
|
|
1433
1510
|
if (contentEle) {
|
|
@@ -1584,6 +1661,8 @@ let MultiColumnComboBox = class MultiColumnComboBox extends Component {
|
|
|
1584
1661
|
this.popupEle = null;
|
|
1585
1662
|
this.footer = null;
|
|
1586
1663
|
this.noRecord = null;
|
|
1664
|
+
this.hiddenElement = null;
|
|
1665
|
+
this.dropdownElement = null;
|
|
1587
1666
|
super.destroy();
|
|
1588
1667
|
}
|
|
1589
1668
|
/**
|