@syncfusion/ej2-dropdowns 33.1.47 → 33.1.49
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-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 +24 -10
- package/dist/es6/ej2-dropdowns.es2015.js.map +1 -1
- package/dist/es6/ej2-dropdowns.es5.js +24 -10
- 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 +4 -4
- package/src/drop-down-base/drop-down-base.js +2 -2
- package/src/drop-down-tree/drop-down-tree.js +6 -0
- package/src/multi-select/multi-select.js +16 -8
|
@@ -1567,8 +1567,8 @@ let DropDownBase = class DropDownBase extends Component {
|
|
|
1567
1567
|
this.isPreventChange = this.isAngular && this.preventChange ? true : this.isPreventChange;
|
|
1568
1568
|
let isReOrder = true;
|
|
1569
1569
|
if (!this.virtualSelectAll) {
|
|
1570
|
-
let newQueryWhereCount;
|
|
1571
|
-
let queryWhereCount;
|
|
1570
|
+
let newQueryWhereCount = 0;
|
|
1571
|
+
let queryWhereCount = 0;
|
|
1572
1572
|
const newQuery = query.clone();
|
|
1573
1573
|
for (let queryElements = 0; queryElements < newQuery.queries.length; queryElements++) {
|
|
1574
1574
|
if (newQuery.queries[queryElements].fn === 'onWhere') {
|
|
@@ -8577,6 +8577,9 @@ let DropDownTree = class DropDownTree extends Component {
|
|
|
8577
8577
|
if (formElement) {
|
|
8578
8578
|
EventHandler.add(formElement, 'reset', this.resetValueHandler, this);
|
|
8579
8579
|
}
|
|
8580
|
+
if (this.keyboardModule && typeof this.keyboardModule.destroy === 'function') {
|
|
8581
|
+
this.keyboardModule.destroy();
|
|
8582
|
+
}
|
|
8580
8583
|
this.keyboardModule = new KeyboardEvents(this.inputWrapper, {
|
|
8581
8584
|
keyAction: this.keyActionHandler.bind(this),
|
|
8582
8585
|
keyConfigs: this.keyConfigs,
|
|
@@ -8584,6 +8587,9 @@ let DropDownTree = class DropDownTree extends Component {
|
|
|
8584
8587
|
});
|
|
8585
8588
|
}
|
|
8586
8589
|
wireTreeEvents() {
|
|
8590
|
+
if (this.keyboardModule && typeof this.keyboardModule.destroy === 'function') {
|
|
8591
|
+
this.keyboardModule.destroy();
|
|
8592
|
+
}
|
|
8587
8593
|
this.keyboardModule = new KeyboardEvents(this.tree, {
|
|
8588
8594
|
keyAction: this.treeAction.bind(this),
|
|
8589
8595
|
keyConfigs: this.keyConfigs,
|
|
@@ -18290,7 +18296,7 @@ let MultiSelect = class MultiSelect extends DropDownBase {
|
|
|
18290
18296
|
this.virtualSelectAll = true;
|
|
18291
18297
|
length = this.virtualSelectAllData && this.virtualSelectAllData.length !== 0 ? this.virtualSelectAllData.length : length;
|
|
18292
18298
|
this.listData = this.virtualSelectAllData;
|
|
18293
|
-
const ulElement = this.createListItems(this.virtualSelectAllData.slice(0,
|
|
18299
|
+
const ulElement = this.createListItems(this.virtualSelectAllData.slice(0, Math.min(50, this.virtualSelectAllData.length)), this.fields);
|
|
18294
18300
|
const firstItems = ulElement.querySelectorAll('li');
|
|
18295
18301
|
const fragment = document.createDocumentFragment();
|
|
18296
18302
|
firstItems.forEach((node) => {
|
|
@@ -18317,7 +18323,10 @@ let MultiSelect = class MultiSelect extends DropDownBase {
|
|
|
18317
18323
|
this.updateListSelection(concatenatedNodeList[index], event, length - index);
|
|
18318
18324
|
}
|
|
18319
18325
|
else {
|
|
18320
|
-
|
|
18326
|
+
const rawItem = this.virtualSelectAllData[index];
|
|
18327
|
+
let value = this.fields.value
|
|
18328
|
+
? getValue(this.fields.value, rawItem)
|
|
18329
|
+
: (typeof rawItem === 'object' && rawItem !== null ? rawItem : rawItem);
|
|
18321
18330
|
value = this.allowObjectBinding ? this.getDataByValue(value) : value;
|
|
18322
18331
|
if (((!this.allowObjectBinding && this.value && this.value.indexOf(value) >= 0) ||
|
|
18323
18332
|
(this.allowObjectBinding && this.indexOfObjectInArray(value, this.value) >= 0))) {
|
|
@@ -18349,12 +18358,17 @@ let MultiSelect = class MultiSelect extends DropDownBase {
|
|
|
18349
18358
|
const batch = dataArray.slice(currentIndex, endIndex);
|
|
18350
18359
|
// Use map on the batch
|
|
18351
18360
|
batch.map((obj) => {
|
|
18352
|
-
|
|
18353
|
-
|
|
18354
|
-
|
|
18355
|
-
|
|
18356
|
-
|
|
18357
|
-
|
|
18361
|
+
const isPlainValue = typeof obj !== 'object' || obj === null;
|
|
18362
|
+
const value = isPlainValue
|
|
18363
|
+
? obj
|
|
18364
|
+
: (this.fields.value ? obj[this.fields.value] : obj);
|
|
18365
|
+
const text = isPlainValue
|
|
18366
|
+
? String(obj)
|
|
18367
|
+
: (this.fields.text ? (obj[this.fields.text]).toString() : String(obj));
|
|
18368
|
+
if (this.value && value != null && Array.isArray(this.value) &&
|
|
18369
|
+
((!this.allowObjectBinding && this.value.indexOf(value) < 0) ||
|
|
18370
|
+
(this.allowObjectBinding && !this.isObjectInArray(value, this.value)))) {
|
|
18371
|
+
this.dispatchSelect(value, event, null, false, length, isPlainValue ? null : obj, text);
|
|
18358
18372
|
}
|
|
18359
18373
|
});
|
|
18360
18374
|
currentIndex = endIndex;
|