@syncfusion/ej2-multicolumn-combobox 31.2.4 → 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/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 +39 -34
- package/dist/es6/ej2-multicolumn-combobox.es2015.js.map +1 -1
- package/dist/es6/ej2-multicolumn-combobox.es5.js +39 -34
- 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 +39 -34
|
@@ -327,6 +327,10 @@ var MultiColumnComboBox = /** @__PURE__ @class */ (function (_super) {
|
|
|
327
327
|
};
|
|
328
328
|
MultiColumnComboBox.prototype.render = function () {
|
|
329
329
|
this.renderInput();
|
|
330
|
+
if ((!isNullOrUndefined(this.value) || !isNullOrUndefined(this.text) || !isNullOrUndefined(this.index)) && !isNullOrUndefined(this.dataSource)
|
|
331
|
+
&& this.dataSource instanceof DataManager) {
|
|
332
|
+
this.isInitialValueRender = true;
|
|
333
|
+
}
|
|
330
334
|
if (this.gridData == null) {
|
|
331
335
|
this.setGridData(this.dataSource);
|
|
332
336
|
}
|
|
@@ -354,6 +358,10 @@ var MultiColumnComboBox = /** @__PURE__ @class */ (function (_super) {
|
|
|
354
358
|
_this.remoteDataLength = _this.gridData.length;
|
|
355
359
|
_this.isMainDataUpdated = true;
|
|
356
360
|
}
|
|
361
|
+
if (_this.isInitialValueRender) {
|
|
362
|
+
_this.isInitialValueRender = false;
|
|
363
|
+
_this.initValue(null, null, true);
|
|
364
|
+
}
|
|
357
365
|
if (_this.popupDiv) {
|
|
358
366
|
_this.updateGridDataSource();
|
|
359
367
|
}
|
|
@@ -472,7 +480,7 @@ var MultiColumnComboBox = /** @__PURE__ @class */ (function (_super) {
|
|
|
472
480
|
SortOrder.Ascending : SortOrder.Descending }] };
|
|
473
481
|
}
|
|
474
482
|
this.gridObj.appendTo(this.gridEle);
|
|
475
|
-
if (!isNullOrUndefined(this.value) || !isNullOrUndefined(this.text) || !isNullOrUndefined(this.index)) {
|
|
483
|
+
if ((!isNullOrUndefined(this.value) || !isNullOrUndefined(this.text) || !isNullOrUndefined(this.index)) && !isNullOrUndefined(this.dataSource) && this.dataSource instanceof Array) {
|
|
476
484
|
this.initValue(null, null, true);
|
|
477
485
|
}
|
|
478
486
|
};
|
|
@@ -841,22 +849,21 @@ var MultiColumnComboBox = /** @__PURE__ @class */ (function (_super) {
|
|
|
841
849
|
};
|
|
842
850
|
if ((!isRerender && (!isNullOrUndefined(this.value) || !isNullOrUndefined(this.text))) || (isRerender && isValue !== undefined)) {
|
|
843
851
|
var value_1 = isRerender ? (isValue ? this.value : this.text) : (!isNullOrUndefined(this.value) ? this.value : this.text);
|
|
844
|
-
if (!isNullOrUndefined(this.dataSource) && this.dataSource instanceof DataManager
|
|
845
|
-
this.
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
});
|
|
853
|
-
if (filteredData.length > 0) {
|
|
854
|
-
item = filteredData[0];
|
|
855
|
-
updateValues(dataLists);
|
|
856
|
-
_this.updateChangeEvent(item, prevItemData, prevItemEle, currentValue, currentText, currentIndex, isRerender, isInitial);
|
|
857
|
-
_this.gridObj.selectRow(_this.index);
|
|
858
|
-
}
|
|
852
|
+
if (!isNullOrUndefined(this.dataSource) && this.dataSource instanceof DataManager && this.mainData
|
|
853
|
+
&& this.isMainDataUpdated) {
|
|
854
|
+
var dataLists = ((this.query && this.getQuery(this.query).isCountRequired) ||
|
|
855
|
+
!this.query) ? this.mainData : this.mainData.result ? this.mainData.result : this.mainData;
|
|
856
|
+
var filteredData = dataLists.filter(function (item) {
|
|
857
|
+
var fieldVal = item ? (_this.updateFieldValue(isRerender ? (isValue ? _this.fields.value :
|
|
858
|
+
_this.fields.text) : !isNullOrUndefined(_this.value) ? _this.fields.value : _this.fields.text, item)) : null;
|
|
859
|
+
return fieldVal === value_1;
|
|
859
860
|
});
|
|
861
|
+
if (filteredData.length > 0) {
|
|
862
|
+
item = filteredData[0];
|
|
863
|
+
updateValues(dataLists);
|
|
864
|
+
this.updateChangeEvent(item, prevItemData, prevItemEle, currentValue, currentText, currentIndex, isRerender, isInitial);
|
|
865
|
+
this.gridObj.selectRow(this.index);
|
|
866
|
+
}
|
|
860
867
|
}
|
|
861
868
|
else if (!isNullOrUndefined(this.dataSource) && this.dataSource instanceof Array) {
|
|
862
869
|
item = this.dataSource.filter(function (data) {
|
|
@@ -868,15 +875,14 @@ var MultiColumnComboBox = /** @__PURE__ @class */ (function (_super) {
|
|
|
868
875
|
}
|
|
869
876
|
}
|
|
870
877
|
else if (!isNullOrUndefined(this.index)) {
|
|
871
|
-
if (!isNullOrUndefined(this.dataSource) && this.dataSource instanceof DataManager
|
|
872
|
-
this.
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
});
|
|
878
|
+
if (!isNullOrUndefined(this.dataSource) && this.dataSource instanceof DataManager && this.mainData
|
|
879
|
+
&& this.isMainDataUpdated) {
|
|
880
|
+
var dataLists = ((this.query && this.getQuery(this.query).isCountRequired) ||
|
|
881
|
+
!this.query) ? this.mainData : this.mainData.result ? this.mainData.result : this.mainData;
|
|
882
|
+
item = dataLists[this.index];
|
|
883
|
+
updateValues(dataLists);
|
|
884
|
+
this.updateChangeEvent(item, prevItemData, prevItemEle, currentValue, currentText, currentIndex, isRerender, isInitial);
|
|
885
|
+
this.gridObj.selectRow(this.index);
|
|
880
886
|
}
|
|
881
887
|
else if (!isNullOrUndefined(this.dataSource) && this.dataSource instanceof Array) {
|
|
882
888
|
if (!this.fields.groupBy) {
|
|
@@ -1692,15 +1698,14 @@ var MultiColumnComboBox = /** @__PURE__ @class */ (function (_super) {
|
|
|
1692
1698
|
return fieldValue === value;
|
|
1693
1699
|
})[0];
|
|
1694
1700
|
}
|
|
1695
|
-
else if (!isNullOrUndefined(this.dataSource) && this.dataSource instanceof DataManager
|
|
1696
|
-
this.
|
|
1697
|
-
|
|
1698
|
-
|
|
1699
|
-
|
|
1700
|
-
|
|
1701
|
-
|
|
1702
|
-
|
|
1703
|
-
});
|
|
1701
|
+
else if (!isNullOrUndefined(this.dataSource) && this.dataSource instanceof DataManager && this.mainData
|
|
1702
|
+
&& this.isMainDataUpdated) {
|
|
1703
|
+
var dataLists = ((this.query && this.getQuery(this.query).isCountRequired) ||
|
|
1704
|
+
!this.query) ? this.mainData : this.mainData.result ? this.mainData.result : this.mainData;
|
|
1705
|
+
return dataLists.filter(function (item) {
|
|
1706
|
+
var fieldValue = _this.updateFieldValue(_this.fields.value, item);
|
|
1707
|
+
return fieldValue === value;
|
|
1708
|
+
})[0];
|
|
1704
1709
|
}
|
|
1705
1710
|
return null;
|
|
1706
1711
|
};
|