@syncfusion/ej2-multicolumn-combobox 31.2.2 → 31.2.12
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 +22 -9
- 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 +40 -35
- package/dist/es6/ej2-multicolumn-combobox.es2015.js.map +1 -1
- package/dist/es6/ej2-multicolumn-combobox.es5.js +40 -35
- 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 +3 -3
- package/src/multicolumn-combobox/multi-column-combo-box.d.ts +1 -0
- package/src/multicolumn-combobox/multi-column-combo-box.js +40 -35
|
@@ -267,6 +267,10 @@ let MultiColumnComboBox = class MultiColumnComboBox extends Component {
|
|
|
267
267
|
}
|
|
268
268
|
render() {
|
|
269
269
|
this.renderInput();
|
|
270
|
+
if ((!isNullOrUndefined(this.value) || !isNullOrUndefined(this.text) || !isNullOrUndefined(this.index)) && !isNullOrUndefined(this.dataSource)
|
|
271
|
+
&& this.dataSource instanceof DataManager) {
|
|
272
|
+
this.isInitialValueRender = true;
|
|
273
|
+
}
|
|
270
274
|
if (this.gridData == null) {
|
|
271
275
|
this.setGridData(this.dataSource);
|
|
272
276
|
}
|
|
@@ -293,6 +297,10 @@ let MultiColumnComboBox = class MultiColumnComboBox extends Component {
|
|
|
293
297
|
this.remoteDataLength = this.gridData.length;
|
|
294
298
|
this.isMainDataUpdated = true;
|
|
295
299
|
}
|
|
300
|
+
if (this.isInitialValueRender) {
|
|
301
|
+
this.isInitialValueRender = false;
|
|
302
|
+
this.initValue(null, null, true);
|
|
303
|
+
}
|
|
296
304
|
if (this.popupDiv) {
|
|
297
305
|
this.updateGridDataSource();
|
|
298
306
|
}
|
|
@@ -410,7 +418,7 @@ let MultiColumnComboBox = class MultiColumnComboBox extends Component {
|
|
|
410
418
|
SortOrder.Ascending : SortOrder.Descending }] };
|
|
411
419
|
}
|
|
412
420
|
this.gridObj.appendTo(this.gridEle);
|
|
413
|
-
if (!isNullOrUndefined(this.value) || !isNullOrUndefined(this.text) || !isNullOrUndefined(this.index)) {
|
|
421
|
+
if ((!isNullOrUndefined(this.value) || !isNullOrUndefined(this.text) || !isNullOrUndefined(this.index)) && !isNullOrUndefined(this.dataSource) && this.dataSource instanceof Array) {
|
|
414
422
|
this.initValue(null, null, true);
|
|
415
423
|
}
|
|
416
424
|
}
|
|
@@ -769,22 +777,21 @@ let MultiColumnComboBox = class MultiColumnComboBox extends Component {
|
|
|
769
777
|
};
|
|
770
778
|
if ((!isRerender && (!isNullOrUndefined(this.value) || !isNullOrUndefined(this.text))) || (isRerender && isValue !== undefined)) {
|
|
771
779
|
const value = isRerender ? (isValue ? this.value : this.text) : (!isNullOrUndefined(this.value) ? this.value : this.text);
|
|
772
|
-
if (!isNullOrUndefined(this.dataSource) && this.dataSource instanceof DataManager
|
|
773
|
-
this.
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
});
|
|
781
|
-
if (filteredData.length > 0) {
|
|
782
|
-
item = filteredData[0];
|
|
783
|
-
updateValues(dataLists);
|
|
784
|
-
this.updateChangeEvent(item, prevItemData, prevItemEle, currentValue, currentText, currentIndex, isRerender, isInitial);
|
|
785
|
-
this.gridObj.selectRow(this.index);
|
|
786
|
-
}
|
|
780
|
+
if (!isNullOrUndefined(this.dataSource) && this.dataSource instanceof DataManager && this.mainData
|
|
781
|
+
&& this.isMainDataUpdated) {
|
|
782
|
+
const dataLists = ((this.query && this.getQuery(this.query).isCountRequired) ||
|
|
783
|
+
!this.query) ? this.mainData : this.mainData.result ? this.mainData.result : this.mainData;
|
|
784
|
+
const filteredData = dataLists.filter((item) => {
|
|
785
|
+
const fieldVal = item ? (this.updateFieldValue(isRerender ? (isValue ? this.fields.value :
|
|
786
|
+
this.fields.text) : !isNullOrUndefined(this.value) ? this.fields.value : this.fields.text, item)) : null;
|
|
787
|
+
return fieldVal === value;
|
|
787
788
|
});
|
|
789
|
+
if (filteredData.length > 0) {
|
|
790
|
+
item = filteredData[0];
|
|
791
|
+
updateValues(dataLists);
|
|
792
|
+
this.updateChangeEvent(item, prevItemData, prevItemEle, currentValue, currentText, currentIndex, isRerender, isInitial);
|
|
793
|
+
this.gridObj.selectRow(this.index);
|
|
794
|
+
}
|
|
788
795
|
}
|
|
789
796
|
else if (!isNullOrUndefined(this.dataSource) && this.dataSource instanceof Array) {
|
|
790
797
|
item = this.dataSource.filter((data) => {
|
|
@@ -796,15 +803,14 @@ let MultiColumnComboBox = class MultiColumnComboBox extends Component {
|
|
|
796
803
|
}
|
|
797
804
|
}
|
|
798
805
|
else if (!isNullOrUndefined(this.index)) {
|
|
799
|
-
if (!isNullOrUndefined(this.dataSource) && this.dataSource instanceof DataManager
|
|
800
|
-
this.
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
});
|
|
806
|
+
if (!isNullOrUndefined(this.dataSource) && this.dataSource instanceof DataManager && this.mainData
|
|
807
|
+
&& this.isMainDataUpdated) {
|
|
808
|
+
const dataLists = ((this.query && this.getQuery(this.query).isCountRequired) ||
|
|
809
|
+
!this.query) ? this.mainData : this.mainData.result ? this.mainData.result : this.mainData;
|
|
810
|
+
item = dataLists[this.index];
|
|
811
|
+
updateValues(dataLists);
|
|
812
|
+
this.updateChangeEvent(item, prevItemData, prevItemEle, currentValue, currentText, currentIndex, isRerender, isInitial);
|
|
813
|
+
this.gridObj.selectRow(this.index);
|
|
808
814
|
}
|
|
809
815
|
else if (!isNullOrUndefined(this.dataSource) && this.dataSource instanceof Array) {
|
|
810
816
|
if (!this.fields.groupBy) {
|
|
@@ -1506,7 +1512,7 @@ let MultiColumnComboBox = class MultiColumnComboBox extends Component {
|
|
|
1506
1512
|
this.isPopupOpen = true;
|
|
1507
1513
|
this.popupObj.refreshPosition();
|
|
1508
1514
|
addClass([this.inputWrapper], [ICONANIMATION]);
|
|
1509
|
-
attributes(this.inputEle, { 'aria-expanded': 'true', 'aria-owns': this.element.id + '
|
|
1515
|
+
attributes(this.inputEle, { 'aria-expanded': 'true', 'aria-owns': this.element.id + '_options', 'aria-controls': this.element.id });
|
|
1510
1516
|
if (!isInputOpen) {
|
|
1511
1517
|
if ((this.value || this.text || this.index)) {
|
|
1512
1518
|
this.gridObj.selectRow(this.selectedRowIndex);
|
|
@@ -1607,15 +1613,14 @@ let MultiColumnComboBox = class MultiColumnComboBox extends Component {
|
|
|
1607
1613
|
return fieldValue === value;
|
|
1608
1614
|
})[0];
|
|
1609
1615
|
}
|
|
1610
|
-
else if (!isNullOrUndefined(this.dataSource) && this.dataSource instanceof DataManager
|
|
1611
|
-
this.
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
});
|
|
1616
|
+
else if (!isNullOrUndefined(this.dataSource) && this.dataSource instanceof DataManager && this.mainData
|
|
1617
|
+
&& this.isMainDataUpdated) {
|
|
1618
|
+
const dataLists = ((this.query && this.getQuery(this.query).isCountRequired) ||
|
|
1619
|
+
!this.query) ? this.mainData : this.mainData.result ? this.mainData.result : this.mainData;
|
|
1620
|
+
return dataLists.filter((item) => {
|
|
1621
|
+
const fieldValue = this.updateFieldValue(this.fields.value, item);
|
|
1622
|
+
return fieldValue === value;
|
|
1623
|
+
})[0];
|
|
1619
1624
|
}
|
|
1620
1625
|
return null;
|
|
1621
1626
|
}
|