@syncfusion/ej2-dropdowns 33.2.3 → 33.2.4
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 +61 -2
- package/dist/es6/ej2-dropdowns.es2015.js.map +1 -1
- package/dist/es6/ej2-dropdowns.es5.js +61 -2
- 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 +3 -3
- package/src/drop-down-tree/drop-down-tree.js +6 -0
- package/src/mention/mention.js +1 -1
- package/src/multi-select/multi-select.d.ts +1 -0
- package/src/multi-select/multi-select.js +54 -1
|
@@ -9814,6 +9814,9 @@ let DropDownTree = class DropDownTree extends Component {
|
|
|
9814
9814
|
removeClass([this.popupDiv], NODATA);
|
|
9815
9815
|
this.hideCheckAll(false);
|
|
9816
9816
|
}
|
|
9817
|
+
else {
|
|
9818
|
+
this.hideCheckAll(this.treeItems.length <= 1);
|
|
9819
|
+
}
|
|
9817
9820
|
if (!this.isFilteredData) {
|
|
9818
9821
|
this.treeDataType = this.getTreeDataType(this.treeItems, this.fields);
|
|
9819
9822
|
}
|
|
@@ -11220,6 +11223,9 @@ let DropDownTree = class DropDownTree extends Component {
|
|
|
11220
11223
|
EventHandler.remove(element, 'mouseup', this.removeChip);
|
|
11221
11224
|
}
|
|
11222
11225
|
}
|
|
11226
|
+
if (this.keyboardModule) {
|
|
11227
|
+
this.keyboardModule.destroy();
|
|
11228
|
+
}
|
|
11223
11229
|
this.chipWrapper = null;
|
|
11224
11230
|
this.chipCollection = null;
|
|
11225
11231
|
this.checkAllParent = null;
|
|
@@ -19766,7 +19772,11 @@ let MultiSelect = class MultiSelect extends DropDownBase {
|
|
|
19766
19772
|
});
|
|
19767
19773
|
}
|
|
19768
19774
|
else {
|
|
19769
|
-
listItems =
|
|
19775
|
+
listItems = this.executeLocalForLargeSelection(this.dataSource, this.value, {
|
|
19776
|
+
fields: this.fields,
|
|
19777
|
+
allowObjectBinding: this.allowObjectBinding,
|
|
19778
|
+
isPrimitiveData: this.isPrimitiveData
|
|
19779
|
+
});
|
|
19770
19780
|
}
|
|
19771
19781
|
}
|
|
19772
19782
|
if (!(this.dataSource instanceof DataManager)) {
|
|
@@ -19795,6 +19805,55 @@ let MultiSelect = class MultiSelect extends DropDownBase {
|
|
|
19795
19805
|
this.element.setAttribute('data-initial-value', this.text);
|
|
19796
19806
|
}
|
|
19797
19807
|
}
|
|
19808
|
+
executeLocalForLargeSelection(dataSource, values, options) {
|
|
19809
|
+
if (!dataSource || !dataSource.length || !values || !values.length) {
|
|
19810
|
+
return [];
|
|
19811
|
+
}
|
|
19812
|
+
const { fields, allowObjectBinding, isPrimitiveData, predicateChunkSize = 100 } = options;
|
|
19813
|
+
if (values.length === dataSource.length) {
|
|
19814
|
+
return dataSource.slice();
|
|
19815
|
+
}
|
|
19816
|
+
const field = isPrimitiveData ? '' : fields.value;
|
|
19817
|
+
const allResults = [];
|
|
19818
|
+
let predicate = null;
|
|
19819
|
+
let count = 0;
|
|
19820
|
+
const flushPredicate = () => {
|
|
19821
|
+
if (!predicate) {
|
|
19822
|
+
return;
|
|
19823
|
+
}
|
|
19824
|
+
const query = new Query().where(predicate);
|
|
19825
|
+
const result = new DataManager(dataSource).executeLocal(query);
|
|
19826
|
+
allResults.push(...result);
|
|
19827
|
+
predicate = null;
|
|
19828
|
+
count = 0;
|
|
19829
|
+
};
|
|
19830
|
+
for (let i = 0; i < values.length; i++) {
|
|
19831
|
+
const value = allowObjectBinding
|
|
19832
|
+
? getValue(fields.value || '', values[i])
|
|
19833
|
+
: values[i];
|
|
19834
|
+
predicate = predicate
|
|
19835
|
+
? predicate.or(field, 'equal', value)
|
|
19836
|
+
: new Predicate(field, 'equal', value);
|
|
19837
|
+
count++;
|
|
19838
|
+
if (count === predicateChunkSize) {
|
|
19839
|
+
flushPredicate();
|
|
19840
|
+
}
|
|
19841
|
+
}
|
|
19842
|
+
flushPredicate();
|
|
19843
|
+
const uniqueMap = {};
|
|
19844
|
+
const resultArray = [];
|
|
19845
|
+
for (let i = 0; i < allResults.length; i++) {
|
|
19846
|
+
const item = allResults[i];
|
|
19847
|
+
const key = isPrimitiveData
|
|
19848
|
+
? item.toString()
|
|
19849
|
+
: getValue(fields.value, item);
|
|
19850
|
+
if (!uniqueMap.hasOwnProperty(key)) {
|
|
19851
|
+
uniqueMap[key] = item;
|
|
19852
|
+
resultArray.push(item);
|
|
19853
|
+
}
|
|
19854
|
+
}
|
|
19855
|
+
return resultArray;
|
|
19856
|
+
}
|
|
19798
19857
|
checkAutoFocus() {
|
|
19799
19858
|
if (this.element.hasAttribute('autofocus')) {
|
|
19800
19859
|
this.inputElement.focus();
|
|
@@ -23968,7 +24027,7 @@ let Mention = class Mention extends DropDownBase {
|
|
|
23968
24027
|
}
|
|
23969
24028
|
else if (this.allowSpaces && this.queryString !== '' && currentRange && currentRange.trim() !== '' && currentRange.replace('\u00a0', ' ').lastIndexOf(' ') < currentRange.length - 1 &&
|
|
23970
24029
|
e.keyCode !== 38 && e.keyCode !== 40 && e.keyCode !== 8 && (this.mentionChar.charCodeAt(0) === lastWordRange.charCodeAt(0) ||
|
|
23971
|
-
(this.liCollections && this.liCollections.length > 0))) {
|
|
24030
|
+
((this.liCollections && this.liCollections.length > 0) || (this.isPopupOpen && this.list && this.list.classList.contains('e-nodata'))))) {
|
|
23972
24031
|
this.queryString = currentRange.substring(currentRange.lastIndexOf(this.mentionChar) + 1).replace('\u00a0', ' ');
|
|
23973
24032
|
this.searchLists(e);
|
|
23974
24033
|
}
|