@syncfusion/ej2-dropdowns 20.4.38 → 20.4.42
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/CHANGELOG.md +37 -0
- package/README.md +1 -1
- package/dist/ej2-dropdowns.min.js +2 -2
- package/dist/ej2-dropdowns.umd.min.js +2 -2
- package/dist/ej2-dropdowns.umd.min.js.map +1 -1
- package/dist/es6/ej2-dropdowns.es2015.js +40 -8
- package/dist/es6/ej2-dropdowns.es2015.js.map +1 -1
- package/dist/es6/ej2-dropdowns.es5.js +39 -7
- package/dist/es6/ej2-dropdowns.es5.js.map +1 -1
- package/dist/global/ej2-dropdowns.min.js +2 -2
- package/dist/global/ej2-dropdowns.min.js.map +1 -1
- package/dist/global/index.d.ts +1 -1
- package/package.json +13 -12
- package/src/drop-down-base/drop-down-base.js +1 -1
- package/src/drop-down-tree/drop-down-tree.js +3 -0
- package/src/list-box/list-box-model.d.ts +6 -6
- package/src/list-box/list-box.js +11 -3
- package/src/mention/mention.js +12 -3
- package/src/multi-select/multi-select.d.ts +2 -0
- package/src/multi-select/multi-select.js +12 -0
|
@@ -626,10 +626,10 @@ let DropDownBase = class DropDownBase extends Component {
|
|
|
626
626
|
this.isDataFetched = true;
|
|
627
627
|
}
|
|
628
628
|
ulElement = this.renderItems(listItems, fields);
|
|
629
|
+
this.onActionComplete(ulElement, listItems, e);
|
|
629
630
|
if (this.groupTemplate) {
|
|
630
631
|
this.renderGroupTemplate(ulElement);
|
|
631
632
|
}
|
|
632
|
-
this.onActionComplete(ulElement, listItems, e);
|
|
633
633
|
this.isRequested = false;
|
|
634
634
|
this.bindChildItems(listItems, ulElement, fields, e);
|
|
635
635
|
}
|
|
@@ -5952,6 +5952,9 @@ let DropDownTree = class DropDownTree extends Component {
|
|
|
5952
5952
|
}
|
|
5953
5953
|
const eventArgs = { data: args.data };
|
|
5954
5954
|
this.trigger('dataBound', eventArgs);
|
|
5955
|
+
if (this.filterObj === null) {
|
|
5956
|
+
this.isFilteredData = false;
|
|
5957
|
+
}
|
|
5955
5958
|
if (this.isFilteredData) {
|
|
5956
5959
|
this.treeObj.expandAll();
|
|
5957
5960
|
}
|
|
@@ -8929,6 +8932,8 @@ let MultiSelect = class MultiSelect extends DropDownBase {
|
|
|
8929
8932
|
this.isValidKey = false;
|
|
8930
8933
|
this.selectAllEventData = [];
|
|
8931
8934
|
this.selectAllEventEle = [];
|
|
8935
|
+
this.resetMainList = null;
|
|
8936
|
+
this.resetFilteredData = false;
|
|
8932
8937
|
this.scrollFocusStatus = false;
|
|
8933
8938
|
this.keyDownStatus = false;
|
|
8934
8939
|
}
|
|
@@ -9672,6 +9677,10 @@ let MultiSelect = class MultiSelect extends DropDownBase {
|
|
|
9672
9677
|
}
|
|
9673
9678
|
}
|
|
9674
9679
|
this.updateDataList();
|
|
9680
|
+
if (this.resetMainList) {
|
|
9681
|
+
this.mainList = this.resetMainList;
|
|
9682
|
+
this.resetMainList = null;
|
|
9683
|
+
}
|
|
9675
9684
|
this.refreshListItems(null);
|
|
9676
9685
|
if (this.mode !== 'Box' && this.mode !== 'CheckBox') {
|
|
9677
9686
|
this.updateDelimView();
|
|
@@ -11081,6 +11090,7 @@ let MultiSelect = class MultiSelect extends DropDownBase {
|
|
|
11081
11090
|
});
|
|
11082
11091
|
}
|
|
11083
11092
|
search(e) {
|
|
11093
|
+
this.resetFilteredData = true;
|
|
11084
11094
|
if (!isNullOrUndefined(e)) {
|
|
11085
11095
|
this.keyCode = e.keyCode;
|
|
11086
11096
|
}
|
|
@@ -12270,6 +12280,11 @@ let MultiSelect = class MultiSelect extends DropDownBase {
|
|
|
12270
12280
|
onPropertyChanged(newProp, oldProp) {
|
|
12271
12281
|
if (newProp.dataSource && !isNullOrUndefined(Object.keys(newProp.dataSource))
|
|
12272
12282
|
|| newProp.query && !isNullOrUndefined(Object.keys(newProp.query))) {
|
|
12283
|
+
if (this.resetFilteredData) {
|
|
12284
|
+
// The filtered data is not being reset in the component after the user focuses out.
|
|
12285
|
+
this.resetMainList = !this.resetMainList ? this.mainList : this.resetMainList;
|
|
12286
|
+
this.resetFilteredData = false;
|
|
12287
|
+
}
|
|
12273
12288
|
this.mainList = null;
|
|
12274
12289
|
this.mainData = null;
|
|
12275
12290
|
this.isFirstClick = false;
|
|
@@ -14154,7 +14169,8 @@ let ListBox = ListBox_1 = class ListBox extends DropDownBase {
|
|
|
14154
14169
|
dragArgs = extend(dragArgs, { destination: dragArgs1 });
|
|
14155
14170
|
}
|
|
14156
14171
|
this.trigger('drop', dragArgs);
|
|
14157
|
-
|
|
14172
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
14173
|
+
const liCollElem = dragArgs.elements;
|
|
14158
14174
|
if (liCollElem.length) {
|
|
14159
14175
|
for (let i = 0; i < liCollElem.length; i++) {
|
|
14160
14176
|
liCollElem[i].classList.remove('e-grabbed');
|
|
@@ -15033,7 +15049,7 @@ let ListBox = ListBox_1 = class ListBox extends DropDownBase {
|
|
|
15033
15049
|
const isRefresh = tListBox.sortOrder !== 'None' || (tListBox.selectionSettings.showCheckbox !==
|
|
15034
15050
|
fListBox.selectionSettings.showCheckbox) || tListBox.fields.groupBy || tListBox.itemTemplate || fListBox.itemTemplate;
|
|
15035
15051
|
this.removeSelected(fListBox, fListBox.getSelectedItems());
|
|
15036
|
-
const tempItems = [].slice.call(fListBox.
|
|
15052
|
+
const tempItems = [].slice.call(fListBox.listData);
|
|
15037
15053
|
const localDataArgs = { cancel: false, items: tempItems, eventName: this.toolbarAction };
|
|
15038
15054
|
fListBox.trigger('actionBegin', localDataArgs);
|
|
15039
15055
|
if (localDataArgs.cancel) {
|
|
@@ -15078,11 +15094,18 @@ let ListBox = ListBox_1 = class ListBox extends DropDownBase {
|
|
|
15078
15094
|
fListBox.value = [];
|
|
15079
15095
|
listData = listData
|
|
15080
15096
|
.filter((data) => data.isHeader !== true);
|
|
15081
|
-
|
|
15097
|
+
const sortedData = listData.filter(function (val) {
|
|
15098
|
+
return tListBox.jsonData.indexOf(val) === -1;
|
|
15099
|
+
});
|
|
15100
|
+
for (let i = 0; i < sortedData.length; i++) {
|
|
15101
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
15102
|
+
tListBox.jsonData.splice(index + i, 0, sortedData[i]);
|
|
15103
|
+
}
|
|
15104
|
+
tListBox.listData = listData;
|
|
15082
15105
|
if (fListBox.listData.length === fListBox.jsonData.length) {
|
|
15083
15106
|
fListBox.listData = fListBox.sortedData = fListBox.jsonData = [];
|
|
15084
15107
|
}
|
|
15085
|
-
else if (
|
|
15108
|
+
else if (fListBox.allowFiltering) {
|
|
15086
15109
|
for (let i = 0; i < fListBox.listData.length; i++) {
|
|
15087
15110
|
for (let j = 0; j < fListBox.jsonData.length; j++) {
|
|
15088
15111
|
if (fListBox.listData[i] === fListBox.jsonData[j]) {
|
|
@@ -16445,9 +16468,18 @@ let Mention = class Mention extends DropDownBase {
|
|
|
16445
16468
|
const args = { cancel: false };
|
|
16446
16469
|
this.trigger('beforeOpen', args, (args) => {
|
|
16447
16470
|
if (!args.cancel) {
|
|
16448
|
-
|
|
16449
|
-
|
|
16450
|
-
|
|
16471
|
+
let popupEle;
|
|
16472
|
+
if (isNullOrUndefined(this.target)) {
|
|
16473
|
+
popupEle = this.createElement('div', {
|
|
16474
|
+
id: this.inputElement.id + '_popup', className: 'e-mention e-popup ' + (this.cssClass != null ? this.cssClass : '')
|
|
16475
|
+
});
|
|
16476
|
+
}
|
|
16477
|
+
else {
|
|
16478
|
+
popupEle = this.element;
|
|
16479
|
+
if (this.cssClass != null) {
|
|
16480
|
+
addClass([popupEle], this.cssClass.split(' '));
|
|
16481
|
+
}
|
|
16482
|
+
}
|
|
16451
16483
|
if (!isNullOrUndefined(this.target)) {
|
|
16452
16484
|
popupEle.id = this.inputElement.id + '_popup';
|
|
16453
16485
|
addClass([popupEle], ['e-mention', 'e-popup', 'e-popup-close']);
|