@syncfusion/ej2-multicolumn-combobox 26.2.12 → 27.1.50
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/.eslintrc.json +261 -0
- 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 +94 -43
- package/dist/es6/ej2-multicolumn-combobox.es2015.js.map +1 -1
- package/dist/es6/ej2-multicolumn-combobox.es5.js +94 -40
- 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 +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 +4 -2
- package/src/multicolumn-combobox/multi-column-combo-box.js +94 -41
- package/styles/bootstrap-dark-lite.css +267 -0
- package/styles/bootstrap-dark-lite.scss +10 -0
- package/styles/bootstrap-dark.css +77 -108
- package/styles/bootstrap-dark.scss +1 -0
- package/styles/bootstrap-lite.css +267 -0
- package/styles/bootstrap-lite.scss +10 -0
- package/styles/bootstrap.css +77 -108
- package/styles/bootstrap.scss +1 -0
- package/styles/bootstrap4-lite.css +309 -0
- package/styles/bootstrap4-lite.scss +10 -0
- package/styles/bootstrap4.css +78 -131
- package/styles/bootstrap4.scss +1 -0
- package/styles/bootstrap5-dark-lite.css +317 -0
- package/styles/bootstrap5-dark-lite.scss +10 -0
- package/styles/bootstrap5-dark.css +78 -127
- package/styles/bootstrap5-dark.scss +1 -0
- package/styles/bootstrap5-lite.css +317 -0
- package/styles/bootstrap5-lite.scss +10 -0
- package/styles/bootstrap5.3-lite.css +321 -0
- package/styles/bootstrap5.3-lite.scss +10 -0
- package/styles/bootstrap5.3.css +372 -0
- package/styles/bootstrap5.3.scss +11 -0
- package/styles/bootstrap5.css +78 -127
- package/styles/bootstrap5.scss +1 -0
- package/styles/fabric-dark-lite.css +243 -0
- package/styles/fabric-dark-lite.scss +10 -0
- package/styles/fabric-dark.css +78 -108
- package/styles/fabric-dark.scss +1 -0
- package/styles/fabric-lite.css +243 -0
- package/styles/fabric-lite.scss +10 -0
- package/styles/fabric.css +78 -101
- package/styles/fabric.scss +1 -0
- package/styles/fluent-dark-lite.css +310 -0
- package/styles/fluent-dark-lite.scss +10 -0
- package/styles/fluent-dark.css +78 -114
- package/styles/fluent-dark.scss +1 -0
- package/styles/fluent-lite.css +310 -0
- package/styles/fluent-lite.scss +10 -0
- package/styles/fluent.css +78 -114
- package/styles/fluent.scss +1 -0
- package/styles/fluent2-lite.css +314 -0
- package/styles/fluent2-lite.scss +10 -0
- package/styles/fluent2.css +78 -111
- package/styles/fluent2.scss +1 -0
- package/styles/highcontrast-light-lite.css +264 -0
- package/styles/highcontrast-light-lite.scss +10 -0
- package/styles/highcontrast-light.css +78 -98
- package/styles/highcontrast-light.scss +1 -0
- package/styles/highcontrast-lite.css +268 -0
- package/styles/highcontrast-lite.scss +10 -0
- package/styles/highcontrast.css +82 -98
- package/styles/highcontrast.scss +1 -0
- package/styles/material-dark-lite.css +292 -0
- package/styles/material-dark-lite.scss +10 -0
- package/styles/material-dark.css +78 -92
- package/styles/material-dark.scss +1 -0
- package/styles/material-lite.css +296 -0
- package/styles/material-lite.scss +10 -0
- package/styles/material.css +78 -113
- package/styles/material.scss +1 -0
- package/styles/material3-dark-lite.css +306 -0
- package/styles/material3-dark-lite.scss +10 -0
- package/styles/material3-dark.css +77 -116
- package/styles/material3-dark.scss +1 -0
- package/styles/material3-lite.css +308 -0
- package/styles/material3-lite.scss +10 -0
- package/styles/material3.css +77 -116
- package/styles/material3.scss +1 -0
- package/styles/multicolumn-combobox/_bds-definition.scss +1 -0
- package/styles/multicolumn-combobox/_bigger.scss +37 -0
- package/styles/multicolumn-combobox/_bootstrap-dark-definition.scss +1 -0
- package/styles/multicolumn-combobox/_bootstrap-definition.scss +1 -0
- package/styles/multicolumn-combobox/_bootstrap4-definition.scss +1 -0
- package/styles/multicolumn-combobox/_bootstrap5-definition.scss +1 -0
- package/styles/multicolumn-combobox/_bootstrap5.3-definition.scss +15 -14
- package/styles/multicolumn-combobox/_fabric-dark-definition.scss +1 -0
- package/styles/multicolumn-combobox/_fabric-definition.scss +1 -0
- package/styles/multicolumn-combobox/_fluent-definition.scss +1 -0
- package/styles/multicolumn-combobox/_fluent2-definition.scss +1 -0
- package/styles/multicolumn-combobox/_fusionnew-definition.scss +1 -0
- package/styles/multicolumn-combobox/_highcontrast-definition.scss +1 -0
- package/styles/multicolumn-combobox/_highcontrast-light-definition.scss +1 -0
- package/styles/multicolumn-combobox/_layout.scss +34 -33
- package/styles/multicolumn-combobox/_material-dark-definition.scss +1 -0
- package/styles/multicolumn-combobox/_material-definition.scss +1 -0
- package/styles/multicolumn-combobox/_material3-definition.scss +1 -0
- package/styles/multicolumn-combobox/_tailwind-definition.scss +1 -0
- package/styles/multicolumn-combobox/_theme.scss +3 -0
- package/styles/multicolumn-combobox/bootstrap-dark.css +77 -108
- package/styles/multicolumn-combobox/bootstrap-dark.scss +1 -0
- package/styles/multicolumn-combobox/bootstrap.css +77 -108
- package/styles/multicolumn-combobox/bootstrap.scss +1 -0
- package/styles/multicolumn-combobox/bootstrap4.css +78 -131
- package/styles/multicolumn-combobox/bootstrap4.scss +1 -0
- package/styles/multicolumn-combobox/bootstrap5-dark.css +78 -127
- package/styles/multicolumn-combobox/bootstrap5-dark.scss +1 -0
- package/styles/multicolumn-combobox/bootstrap5.3.css +372 -0
- package/styles/multicolumn-combobox/bootstrap5.3.scss +11 -0
- package/styles/multicolumn-combobox/bootstrap5.css +78 -127
- package/styles/multicolumn-combobox/bootstrap5.scss +1 -0
- package/styles/multicolumn-combobox/fabric-dark.css +78 -108
- package/styles/multicolumn-combobox/fabric-dark.scss +1 -0
- package/styles/multicolumn-combobox/fabric.css +78 -101
- package/styles/multicolumn-combobox/fabric.scss +1 -0
- package/styles/multicolumn-combobox/fluent-dark.css +78 -114
- package/styles/multicolumn-combobox/fluent-dark.scss +1 -0
- package/styles/multicolumn-combobox/fluent.css +78 -114
- package/styles/multicolumn-combobox/fluent.scss +1 -0
- package/styles/multicolumn-combobox/fluent2.css +78 -111
- package/styles/multicolumn-combobox/fluent2.scss +1 -0
- package/styles/multicolumn-combobox/highcontrast-light.css +78 -98
- package/styles/multicolumn-combobox/highcontrast-light.scss +1 -0
- package/styles/multicolumn-combobox/highcontrast.css +82 -98
- package/styles/multicolumn-combobox/highcontrast.scss +1 -0
- package/styles/multicolumn-combobox/material-dark.css +78 -92
- package/styles/multicolumn-combobox/material-dark.scss +1 -0
- package/styles/multicolumn-combobox/material.css +78 -113
- package/styles/multicolumn-combobox/material.scss +1 -0
- package/styles/multicolumn-combobox/material3-dark.css +77 -116
- package/styles/multicolumn-combobox/material3-dark.scss +1 -0
- package/styles/multicolumn-combobox/material3.css +77 -116
- package/styles/multicolumn-combobox/material3.scss +1 -0
- package/styles/multicolumn-combobox/tailwind-dark.css +78 -111
- package/styles/multicolumn-combobox/tailwind-dark.scss +1 -0
- package/styles/multicolumn-combobox/tailwind.css +78 -111
- package/styles/multicolumn-combobox/tailwind.scss +1 -0
- package/styles/tailwind-dark-lite.css +297 -0
- package/styles/tailwind-dark-lite.scss +10 -0
- package/styles/tailwind-dark.css +78 -111
- package/styles/tailwind-dark.scss +1 -0
- package/styles/tailwind-lite.css +297 -0
- package/styles/tailwind-lite.scss +10 -0
- package/styles/tailwind.css +78 -111
- package/styles/tailwind.scss +1 -0
- package/tslint.json +111 -0
|
@@ -169,11 +169,11 @@ __decorate([
|
|
|
169
169
|
* The selected value will be displayed in the input element.
|
|
170
170
|
*
|
|
171
171
|
* ```html
|
|
172
|
-
* <input type=
|
|
172
|
+
* <input type='text' id='multi-column'></input>
|
|
173
173
|
* ```
|
|
174
174
|
* ```typescript
|
|
175
175
|
* let multiColObj: MultiColumnComboBox = new MultiColumnComboBox();
|
|
176
|
-
* multiColObj.appendTo(
|
|
176
|
+
* multiColObj.appendTo('#multi-column');
|
|
177
177
|
* ```
|
|
178
178
|
*/
|
|
179
179
|
let MultiColumnComboBox = class MultiColumnComboBox extends Component {
|
|
@@ -280,6 +280,7 @@ let MultiColumnComboBox = class MultiColumnComboBox extends Component {
|
|
|
280
280
|
if (args.requestType === 'sorting') {
|
|
281
281
|
this.updateRowSelection(args);
|
|
282
282
|
}
|
|
283
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
283
284
|
const dataRows = args.rows;
|
|
284
285
|
if (this.isDataFiltered && dataRows.length > 0 && this.inputEle.value !== '' && args.requestType !== 'sorting') {
|
|
285
286
|
const firstRowEle = this.gridObj.getRows()[0];
|
|
@@ -315,7 +316,7 @@ let MultiColumnComboBox = class MultiColumnComboBox extends Component {
|
|
|
315
316
|
}
|
|
316
317
|
this.gridObj.appendTo(this.gridEle);
|
|
317
318
|
}
|
|
318
|
-
|
|
319
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
319
320
|
isRowMatching(data, selectedValue, selectedText) {
|
|
320
321
|
const values = Object.values(data).map(String);
|
|
321
322
|
const isRowPresent = values.includes(selectedValue) && values.includes(selectedText);
|
|
@@ -344,11 +345,11 @@ let MultiColumnComboBox = class MultiColumnComboBox extends Component {
|
|
|
344
345
|
}
|
|
345
346
|
findIndex(arr, obj) {
|
|
346
347
|
return arr.findIndex((item) => {
|
|
347
|
-
|
|
348
|
+
// eslint-disable-next-line
|
|
349
|
+
return Object.keys(obj).every((key) => item[key] === obj[key]);
|
|
348
350
|
});
|
|
349
351
|
}
|
|
350
|
-
|
|
351
|
-
// eslint-enable @typescript-eslint/no-explicit-any
|
|
352
|
+
/* eslint-enable @typescript-eslint/no-explicit-any */
|
|
352
353
|
getGridColumns() {
|
|
353
354
|
return this.columns.map((column) => {
|
|
354
355
|
let changeType;
|
|
@@ -381,7 +382,7 @@ let MultiColumnComboBox = class MultiColumnComboBox extends Component {
|
|
|
381
382
|
showDropArea: false,
|
|
382
383
|
columns: [this.fields.groupBy],
|
|
383
384
|
captionTemplate: (this.groupTemplate && this.fields.groupBy !== '' && !isNullOrUndefined(this.fields.groupBy))
|
|
384
|
-
? this.groupTemplate :
|
|
385
|
+
? this.groupTemplate : '${key}'
|
|
385
386
|
};
|
|
386
387
|
if (this.isVue) {
|
|
387
388
|
this.gridObj.isVue = this.isVue;
|
|
@@ -405,7 +406,9 @@ let MultiColumnComboBox = class MultiColumnComboBox extends Component {
|
|
|
405
406
|
}
|
|
406
407
|
}
|
|
407
408
|
if (this.isInitialRender) {
|
|
408
|
-
const rowHeight = !this.popupDiv.classList.contains(NODATA) ? this.popupDiv.querySelector('.e-gridcontent tr')
|
|
409
|
+
const rowHeight = !this.popupDiv.classList.contains(NODATA) ? this.popupDiv.querySelector('.e-gridcontent tr') ?
|
|
410
|
+
this.popupDiv.querySelector('.e-gridcontent tr').getBoundingClientRect().height : 0 :
|
|
411
|
+
this.popupDiv.getBoundingClientRect().height;
|
|
409
412
|
this.popupRowHeight = rowHeight;
|
|
410
413
|
this.popupObj.hide();
|
|
411
414
|
this.popupEle.style.visibility = 'unset';
|
|
@@ -584,8 +587,29 @@ let MultiColumnComboBox = class MultiColumnComboBox extends Component {
|
|
|
584
587
|
});
|
|
585
588
|
}
|
|
586
589
|
else if (!isNullOrUndefined(this.dataSource) && this.dataSource instanceof Array) {
|
|
587
|
-
|
|
588
|
-
|
|
590
|
+
if (!this.fields.groupBy) {
|
|
591
|
+
item = this.dataSource[this.index];
|
|
592
|
+
updateValues(this.dataSource);
|
|
593
|
+
}
|
|
594
|
+
else {
|
|
595
|
+
setTimeout(() => {
|
|
596
|
+
const rows = this.gridObj.getRows();
|
|
597
|
+
if (rows && rows.length > 0) {
|
|
598
|
+
const rowData = this.gridObj.getRowInfo(rows[this.index]).rowData;
|
|
599
|
+
const value = this.fields.value;
|
|
600
|
+
for (let i = 0; i < rows.length; i++) {
|
|
601
|
+
if (rowData && rowData[parseInt(value.toString(), 10)] ===
|
|
602
|
+
this.dataSource[parseInt(i.toString(), 10)][parseInt(value.toString(), 10)]) {
|
|
603
|
+
item = rowData;
|
|
604
|
+
updateValues(this.dataSource);
|
|
605
|
+
this.updateChangeEvent(item, prevItemData, prevItemEle, currentValue, currentText, currentIndex, isRerender, isInitial);
|
|
606
|
+
this.gridObj.selectRow(this.index);
|
|
607
|
+
break;
|
|
608
|
+
}
|
|
609
|
+
}
|
|
610
|
+
}
|
|
611
|
+
});
|
|
612
|
+
}
|
|
589
613
|
}
|
|
590
614
|
}
|
|
591
615
|
if (!(this.dataSource instanceof DataManager)) {
|
|
@@ -864,6 +888,7 @@ let MultiColumnComboBox = class MultiColumnComboBox extends Component {
|
|
|
864
888
|
let data;
|
|
865
889
|
if (this.dataSource instanceof DataManager) {
|
|
866
890
|
const query = new Query();
|
|
891
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
867
892
|
this.dataSource.executeQuery(query).then((result) => {
|
|
868
893
|
const totaldata = result.result;
|
|
869
894
|
data = totaldata.filter((item) => {
|
|
@@ -896,37 +921,45 @@ let MultiColumnComboBox = class MultiColumnComboBox extends Component {
|
|
|
896
921
|
}
|
|
897
922
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
898
923
|
filterAction(dataSource, inputValue, query, fields) {
|
|
899
|
-
let dataLists;
|
|
900
924
|
if (isNullOrUndefined(query) && isNullOrUndefined(fields)) {
|
|
901
925
|
this.updateGridDataSource(dataSource);
|
|
902
926
|
}
|
|
903
927
|
else if (query) {
|
|
904
|
-
new DataManager(dataSource).executeQuery(query).then((e) => {
|
|
905
|
-
dataLists = e.result;
|
|
906
|
-
this.updateGridDataSource(dataLists);
|
|
907
|
-
});
|
|
908
|
-
}
|
|
909
|
-
else {
|
|
910
|
-
const filterType = this.filterType.toString().toLowerCase();
|
|
911
|
-
const isQuery = query || new Query();
|
|
912
|
-
let filteredData;
|
|
913
928
|
if (dataSource instanceof DataManager) {
|
|
914
|
-
|
|
915
|
-
|
|
929
|
+
this.filteringHandler(dataSource, inputValue, query, fields);
|
|
930
|
+
}
|
|
931
|
+
else {
|
|
932
|
+
new DataManager(dataSource).executeQuery(query).then((e) => {
|
|
916
933
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
917
934
|
const dataLists = e.result;
|
|
918
|
-
|
|
919
|
-
filteredData = dataLists.filter((item) => this.filterData(item, filterType, inputValue, fields));
|
|
920
|
-
this.updateGridDataSource(filteredData, dataLength);
|
|
935
|
+
this.updateGridDataSource(dataLists);
|
|
921
936
|
});
|
|
922
937
|
}
|
|
938
|
+
}
|
|
939
|
+
else {
|
|
940
|
+
const isQuery = query || new Query();
|
|
941
|
+
if (dataSource instanceof DataManager) {
|
|
942
|
+
this.filteringHandler(dataSource, inputValue, isQuery, fields);
|
|
943
|
+
}
|
|
923
944
|
else if (Array.isArray(dataSource)) {
|
|
924
|
-
|
|
925
|
-
filteredData = dataSource.filter((item) => this.filterData(item, filterType, inputValue, fields));
|
|
945
|
+
const filterType = this.filterType.toString().toLowerCase();
|
|
946
|
+
const filteredData = dataSource.filter((item) => this.filterData(item, filterType, inputValue, fields));
|
|
926
947
|
this.updateGridDataSource(filteredData);
|
|
927
948
|
}
|
|
928
949
|
}
|
|
929
950
|
}
|
|
951
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
952
|
+
filteringHandler(dataSource, inputValue, query, fields) {
|
|
953
|
+
const filterType = this.filterType.toString().toLowerCase();
|
|
954
|
+
let filteredData;
|
|
955
|
+
dataSource.executeQuery(query).then((e) => {
|
|
956
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
957
|
+
const dataLists = e.result;
|
|
958
|
+
const dataLength = dataLists.length;
|
|
959
|
+
filteredData = dataLists.filter((item) => this.filterData(item, filterType, inputValue, fields));
|
|
960
|
+
this.updateGridDataSource(filteredData, dataLength);
|
|
961
|
+
});
|
|
962
|
+
}
|
|
930
963
|
filterData(item, filterType, inputValue, fields) {
|
|
931
964
|
const itemValue = item[fields ? fields.text : this.fields.text].toString().toLowerCase();
|
|
932
965
|
switch (filterType) {
|
|
@@ -943,7 +976,8 @@ let MultiColumnComboBox = class MultiColumnComboBox extends Component {
|
|
|
943
976
|
updateGridDataSource(dataSource, dataLength) {
|
|
944
977
|
let autoHeight = true;
|
|
945
978
|
if (dataSource.length > 0) {
|
|
946
|
-
const length = this.dataSource instanceof DataManager ? dataLength
|
|
979
|
+
const length = this.dataSource instanceof DataManager ? dataLength
|
|
980
|
+
: this.dataSource.length;
|
|
947
981
|
autoHeight = length !== dataSource.length;
|
|
948
982
|
removeClass([this.popupDiv], [NODATA]);
|
|
949
983
|
const noRecordEle = this.popupDiv.querySelector('.e-no-records');
|
|
@@ -1021,7 +1055,7 @@ let MultiColumnComboBox = class MultiColumnComboBox extends Component {
|
|
|
1021
1055
|
onMouseClick(e) {
|
|
1022
1056
|
const target = e.target;
|
|
1023
1057
|
const row = closest(target, '.e-row');
|
|
1024
|
-
|
|
1058
|
+
const selectedRowIndex = this.gridObj.selectedRowIndex;
|
|
1025
1059
|
if (row) {
|
|
1026
1060
|
if (selectedRowIndex >= 0) {
|
|
1027
1061
|
this.selectedGridRow(row, e);
|
|
@@ -1050,7 +1084,7 @@ let MultiColumnComboBox = class MultiColumnComboBox extends Component {
|
|
|
1050
1084
|
}
|
|
1051
1085
|
}
|
|
1052
1086
|
}
|
|
1053
|
-
updateValuesOnInput(mouseEvent, keyEvent, isClearValues) {
|
|
1087
|
+
updateValuesOnInput(mouseEvent, keyEvent, isClearValues = false) {
|
|
1054
1088
|
const e = mouseEvent ? mouseEvent : keyEvent;
|
|
1055
1089
|
this.hidePopup(e);
|
|
1056
1090
|
if (this.matchedRowEle && !isClearValues) {
|
|
@@ -1196,7 +1230,8 @@ let MultiColumnComboBox = class MultiColumnComboBox extends Component {
|
|
|
1196
1230
|
}
|
|
1197
1231
|
updateSelectedItem(e, isUpdateIndex = true, isInputTarget) {
|
|
1198
1232
|
if (this.isPopupOpen) {
|
|
1199
|
-
let index = !this.fields.groupBy ? this.gridObj.selectedRowIndex
|
|
1233
|
+
let index = !this.fields.groupBy ? this.gridObj.selectedRowIndex
|
|
1234
|
+
: this.gridObj.selectedRowIndex ? this.gridObj.selectedRowIndex : 0;
|
|
1200
1235
|
if ((index === -1 && (e.action === 'moveDown' || e.action === 'moveUp')) || (e.action === 'home')) {
|
|
1201
1236
|
index = 0;
|
|
1202
1237
|
}
|
|
@@ -1216,7 +1251,7 @@ let MultiColumnComboBox = class MultiColumnComboBox extends Component {
|
|
|
1216
1251
|
focusedEle.classList.remove('e-row-focus');
|
|
1217
1252
|
}
|
|
1218
1253
|
if (isUpdateIndex) {
|
|
1219
|
-
this.selectedGridRow(this.gridObj.getRows()[index], e, true);
|
|
1254
|
+
this.selectedGridRow(this.gridObj.getRows()[parseInt(index.toString(), 10)], e, true);
|
|
1220
1255
|
}
|
|
1221
1256
|
}
|
|
1222
1257
|
}
|
|
@@ -1257,19 +1292,22 @@ let MultiColumnComboBox = class MultiColumnComboBox extends Component {
|
|
|
1257
1292
|
if (this.isPopupOpen) {
|
|
1258
1293
|
this.hidePopup(e);
|
|
1259
1294
|
}
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
clearIconEle
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1295
|
+
if (this.inputWrapper) {
|
|
1296
|
+
removeClass([this.inputWrapper], [INPUTFOCUS]);
|
|
1297
|
+
const clearIconEle = this.inputWrapper.querySelector('.e-clear-icon');
|
|
1298
|
+
if (clearIconEle) {
|
|
1299
|
+
clearIconEle.style.display = 'none';
|
|
1300
|
+
}
|
|
1301
|
+
if (this.floatLabelType !== 'Never') {
|
|
1302
|
+
Input.calculateWidth(this.inputEle, this.inputWrapper);
|
|
1303
|
+
}
|
|
1267
1304
|
}
|
|
1268
1305
|
}
|
|
1269
1306
|
/**
|
|
1270
1307
|
* Opens the popup that displays the list of items.
|
|
1271
1308
|
*
|
|
1272
1309
|
* @param {MouseEvent | KeyboardEventArgs | TouchEvent} e - Specifies the event.
|
|
1310
|
+
* @param {boolean} isInputOpen - Specifies whether the input is open or not.
|
|
1273
1311
|
* @returns {void}
|
|
1274
1312
|
*/
|
|
1275
1313
|
showPopup(e, isInputOpen) {
|
|
@@ -1283,9 +1321,19 @@ let MultiColumnComboBox = class MultiColumnComboBox extends Component {
|
|
|
1283
1321
|
attributes(this.inputEle, { 'aria-expanded': 'true', 'aria-owns': this.element.id + '_popup', 'aria-controls': this.element.id });
|
|
1284
1322
|
if (!isInputOpen) {
|
|
1285
1323
|
if ((this.value || this.text || this.index)) {
|
|
1286
|
-
const dataRows = this.gridObj.
|
|
1324
|
+
const dataRows = this.gridObj.getRowsObject();
|
|
1325
|
+
let groupIndex;
|
|
1326
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1287
1327
|
dataRows.forEach((data, index) => {
|
|
1288
|
-
this.
|
|
1328
|
+
if (this.fields.groupBy && isNullOrUndefined(data.data.items)) {
|
|
1329
|
+
if (isNullOrUndefined(groupIndex)) {
|
|
1330
|
+
groupIndex = 0;
|
|
1331
|
+
}
|
|
1332
|
+
else {
|
|
1333
|
+
groupIndex += 1;
|
|
1334
|
+
}
|
|
1335
|
+
}
|
|
1336
|
+
this.selectDataRow(data.data, !this.fields.groupBy ? index : groupIndex);
|
|
1289
1337
|
});
|
|
1290
1338
|
}
|
|
1291
1339
|
this.focusIn(e);
|
|
@@ -1497,7 +1545,7 @@ let MultiColumnComboBox = class MultiColumnComboBox extends Component {
|
|
|
1497
1545
|
this.initValue(true, false);
|
|
1498
1546
|
break;
|
|
1499
1547
|
case 'index':
|
|
1500
|
-
this.initValue();
|
|
1548
|
+
this.initValue(true);
|
|
1501
1549
|
break;
|
|
1502
1550
|
case 'sortOrder':
|
|
1503
1551
|
if (this.gridObj) {
|
|
@@ -1571,7 +1619,10 @@ let MultiColumnComboBox = class MultiColumnComboBox extends Component {
|
|
|
1571
1619
|
}
|
|
1572
1620
|
break;
|
|
1573
1621
|
case 'sortType':
|
|
1574
|
-
this.
|
|
1622
|
+
if (this.gridObj) {
|
|
1623
|
+
this.sortType = newProp.sortType;
|
|
1624
|
+
this.gridObj.allowMultiSorting = this.sortType.toString().toLowerCase() === 'multiplecolumns' && this.allowSorting;
|
|
1625
|
+
}
|
|
1575
1626
|
break;
|
|
1576
1627
|
case 'allowFiltering':
|
|
1577
1628
|
this.allowFiltering = newProp.allowFiltering;
|