@syncfusion/ej2-dropdowns 28.1.38 → 28.1.39
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 +48 -6
- package/dist/es6/ej2-dropdowns.es2015.js.map +1 -1
- package/dist/es6/ej2-dropdowns.es5.js +49 -6
- 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 +7 -7
- package/src/combo-box/combo-box.js +2 -2
- package/src/drop-down-base/drop-down-base.js +3 -1
- package/src/drop-down-list/drop-down-list.d.ts +1 -0
- package/src/drop-down-list/drop-down-list.js +11 -1
- package/src/list-box/list-box.js +1 -1
- package/src/mention/mention.js +3 -1
- package/src/multi-select/multi-select.d.ts +2 -0
- package/src/multi-select/multi-select.js +29 -0
- package/styles/bds-lite.css +8 -0
- package/styles/bds.css +8 -0
- package/styles/bootstrap-dark-lite.css +8 -0
- package/styles/bootstrap-dark.css +8 -0
- package/styles/bootstrap-lite.css +8 -0
- package/styles/bootstrap.css +8 -0
- package/styles/bootstrap4-lite.css +8 -0
- package/styles/bootstrap4.css +8 -0
- package/styles/bootstrap5-dark-lite.css +8 -0
- package/styles/bootstrap5-dark.css +8 -0
- package/styles/bootstrap5-lite.css +8 -0
- package/styles/bootstrap5.3-lite.css +8 -0
- package/styles/bootstrap5.3.css +8 -0
- package/styles/bootstrap5.css +8 -0
- package/styles/drop-down-list/_layout.scss +8 -0
- package/styles/drop-down-list/bds.css +8 -0
- package/styles/drop-down-list/bootstrap-dark.css +8 -0
- package/styles/drop-down-list/bootstrap.css +8 -0
- package/styles/drop-down-list/bootstrap4.css +8 -0
- package/styles/drop-down-list/bootstrap5-dark.css +8 -0
- package/styles/drop-down-list/bootstrap5.3.css +8 -0
- package/styles/drop-down-list/bootstrap5.css +8 -0
- package/styles/drop-down-list/fabric-dark.css +8 -0
- package/styles/drop-down-list/fabric.css +8 -0
- package/styles/drop-down-list/fluent-dark.css +8 -0
- package/styles/drop-down-list/fluent.css +8 -0
- package/styles/drop-down-list/fluent2.css +8 -0
- package/styles/drop-down-list/highcontrast-light.css +8 -0
- package/styles/drop-down-list/highcontrast.css +8 -0
- package/styles/drop-down-list/material-dark.css +8 -0
- package/styles/drop-down-list/material.css +8 -0
- package/styles/drop-down-list/material3-dark.css +8 -0
- package/styles/drop-down-list/material3.css +8 -0
- package/styles/drop-down-list/tailwind-dark.css +8 -0
- package/styles/drop-down-list/tailwind.css +8 -0
- package/styles/drop-down-list/tailwind3.css +8 -0
- package/styles/fabric-dark-lite.css +8 -0
- package/styles/fabric-dark.css +8 -0
- package/styles/fabric-lite.css +8 -0
- package/styles/fabric.css +8 -0
- package/styles/fluent-dark-lite.css +8 -0
- package/styles/fluent-dark.css +8 -0
- package/styles/fluent-lite.css +8 -0
- package/styles/fluent.css +8 -0
- package/styles/fluent2-lite.css +8 -0
- package/styles/fluent2.css +8 -0
- package/styles/highcontrast-light-lite.css +8 -0
- package/styles/highcontrast-light.css +8 -0
- package/styles/highcontrast-lite.css +8 -0
- package/styles/highcontrast.css +8 -0
- package/styles/material-dark-lite.css +8 -0
- package/styles/material-dark.css +8 -0
- package/styles/material-lite.css +8 -0
- package/styles/material.css +8 -0
- package/styles/material3-dark-lite.css +8 -0
- package/styles/material3-dark.css +8 -0
- package/styles/material3-lite.css +8 -0
- package/styles/material3.css +8 -0
- package/styles/tailwind-dark-lite.css +8 -0
- package/styles/tailwind-dark.css +8 -0
- package/styles/tailwind-lite.css +8 -0
- package/styles/tailwind.css +8 -0
- package/styles/tailwind3-lite.css +8 -0
- package/styles/tailwind3.css +8 -0
|
@@ -1927,8 +1927,10 @@ let DropDownBase = class DropDownBase extends Component {
|
|
|
1927
1927
|
scrollStop(e, isDownkey) {
|
|
1928
1928
|
const target = !isNullOrUndefined(e) ? e.target : this.list;
|
|
1929
1929
|
const computedHeight = getComputedStyle(this.getValidLi(), null).getPropertyValue('height');
|
|
1930
|
+
const computedMarginValue = getComputedStyle(this.getValidLi(), null).getPropertyValue('margin-bottom');
|
|
1931
|
+
const marginValue = parseInt(computedMarginValue, 10);
|
|
1930
1932
|
const liHeight = this.getModuleName() === 'multiselect' ? parseFloat(computedHeight) : parseInt(computedHeight, 10);
|
|
1931
|
-
const topIndex = Math.round(target.scrollTop / liHeight);
|
|
1933
|
+
const topIndex = Math.round(target.scrollTop / (liHeight + marginValue));
|
|
1932
1934
|
const liCollections = this.list.querySelectorAll('li' + ':not(.e-hide-listitem)');
|
|
1933
1935
|
const virtualListCount = this.list.querySelectorAll('.e-virtual-list').length;
|
|
1934
1936
|
for (let i = topIndex; i > -1; i--) {
|
|
@@ -2830,6 +2832,7 @@ let DropDownList = class DropDownList extends DropDownBase {
|
|
|
2830
2832
|
this.autoFill = false;
|
|
2831
2833
|
this.isUpdateHeaderHeight = false;
|
|
2832
2834
|
this.isUpdateFooterHeight = false;
|
|
2835
|
+
this.isReactTemplateUpdate = false;
|
|
2833
2836
|
}
|
|
2834
2837
|
/**
|
|
2835
2838
|
* Initialize the event handler.
|
|
@@ -4197,6 +4200,7 @@ let DropDownList = class DropDownList extends DropDownBase {
|
|
|
4197
4200
|
setTimeout(() => {
|
|
4198
4201
|
proxy.cloneElements();
|
|
4199
4202
|
proxy.isSecondClick = true;
|
|
4203
|
+
proxy.isSecondClick = proxy.isReact && proxy.isFiltering() && proxy.dataSource instanceof DataManager && !proxy.list.querySelector('ul') ? false : true;
|
|
4200
4204
|
}, duration);
|
|
4201
4205
|
}
|
|
4202
4206
|
}
|
|
@@ -5028,6 +5032,7 @@ let DropDownList = class DropDownList extends DropDownBase {
|
|
|
5028
5032
|
if (this.getInitialData) {
|
|
5029
5033
|
this.updateActionCompleteDataValues(ulElement, list);
|
|
5030
5034
|
this.getInitialData = false;
|
|
5035
|
+
this.isReactTemplateUpdate = true;
|
|
5031
5036
|
this.searchLists(this.filterArgs);
|
|
5032
5037
|
return;
|
|
5033
5038
|
}
|
|
@@ -5455,6 +5460,9 @@ let DropDownList = class DropDownList extends DropDownBase {
|
|
|
5455
5460
|
addClass([this.inputWrapper.container], [dropDownListClasses.iconAnimation]);
|
|
5456
5461
|
}
|
|
5457
5462
|
this.renderReactTemplates();
|
|
5463
|
+
if (this.isReact && this.isFiltering() && this.dataSource instanceof DataManager && this.list.querySelector('ul') && !this.isSecondClick) {
|
|
5464
|
+
this.executeCloneElements();
|
|
5465
|
+
}
|
|
5458
5466
|
if (!isNullOrUndefined(this.popupObj)) {
|
|
5459
5467
|
this.popupObj.show(new Animation(eventArgs.animation), (this.zIndex === 1000) ? this.element : null);
|
|
5460
5468
|
}
|
|
@@ -5551,6 +5559,10 @@ let DropDownList = class DropDownList extends DropDownBase {
|
|
|
5551
5559
|
this.destroyPopup();
|
|
5552
5560
|
if (this.isFiltering() && this.actionCompleteData.list && this.actionCompleteData.list.length > 0) {
|
|
5553
5561
|
this.isActive = true;
|
|
5562
|
+
if (this.isReactTemplateUpdate && this.isReact && this.itemTemplate && !this.enableVirtualization) {
|
|
5563
|
+
this.actionCompleteData.ulElement = this.renderItems(this.actionCompleteData.list, this.fields);
|
|
5564
|
+
this.isReactTemplateUpdate = false;
|
|
5565
|
+
}
|
|
5554
5566
|
if (this.enableVirtualization) {
|
|
5555
5567
|
this.onActionComplete(this.ulElement, this.listData, null, true);
|
|
5556
5568
|
}
|
|
@@ -6846,7 +6858,7 @@ let DropDownList = class DropDownList extends DropDownBase {
|
|
|
6846
6858
|
if (isSelectVal && this.enableVirtualization && this.selectedLI.classList) {
|
|
6847
6859
|
isSelectVal = this.selectedLI.classList.contains('e-active');
|
|
6848
6860
|
}
|
|
6849
|
-
if (this.inputElement && this.inputElement.value
|
|
6861
|
+
if (this.inputElement && this.inputElement.value === '' && !this.isInteracted && (this.isSelectCustom ||
|
|
6850
6862
|
isSelectVal && this.inputElement.value !== dataItem.text)) {
|
|
6851
6863
|
this.isSelectCustom = false;
|
|
6852
6864
|
this.clearAll(e);
|
|
@@ -11297,7 +11309,7 @@ let ComboBox = class ComboBox extends DropDownList {
|
|
|
11297
11309
|
this.onChangeEvent(e);
|
|
11298
11310
|
}
|
|
11299
11311
|
}
|
|
11300
|
-
if (e.action === 'enter' && this.inputElement.value
|
|
11312
|
+
if (e.action === 'enter' && this.inputElement.value === '') {
|
|
11301
11313
|
this.clearAll(e);
|
|
11302
11314
|
}
|
|
11303
11315
|
else if (this.isTyped && !this.isSelected && isNullOrUndefined(li)) {
|
|
@@ -11342,7 +11354,7 @@ let ComboBox = class ComboBox extends DropDownList {
|
|
|
11342
11354
|
this.onChangeEvent(null);
|
|
11343
11355
|
}
|
|
11344
11356
|
}
|
|
11345
|
-
else if (this.inputElement.value
|
|
11357
|
+
else if (this.inputElement.value !== '') {
|
|
11346
11358
|
const previousValue = this.value;
|
|
11347
11359
|
if (isNullOrUndefined(value)) {
|
|
11348
11360
|
const value = this.inputElement.value === '' ? null : this.inputElement.value;
|
|
@@ -12487,6 +12499,8 @@ let MultiSelect = class MultiSelect extends DropDownBase {
|
|
|
12487
12499
|
this.storedSelectAllHeight = 0;
|
|
12488
12500
|
this.isUpdateHeaderHeight = false;
|
|
12489
12501
|
this.isUpdateFooterHeight = false;
|
|
12502
|
+
this.isBlurDispatching = false;
|
|
12503
|
+
this.isFilterPrevented = false;
|
|
12490
12504
|
this.isValidKey = false;
|
|
12491
12505
|
this.selectAllEventData = [];
|
|
12492
12506
|
this.selectAllEventEle = [];
|
|
@@ -12946,6 +12960,19 @@ let MultiSelect = class MultiSelect extends DropDownBase {
|
|
|
12946
12960
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
12947
12961
|
this.totalItemCount = e.count;
|
|
12948
12962
|
}
|
|
12963
|
+
if (this.value && list && list.length > 0 && this.allowFiltering && this.mode !== 'CheckBox' && !this.enableVirtualization && !this.isFilterPrevented && !this.allowCustomValue) {
|
|
12964
|
+
const allItemsInValue = list.every((item) => {
|
|
12965
|
+
const itemValue = getValue((this.fields.value) ? this.fields.value : '', item);
|
|
12966
|
+
return this.value.some((val) => {
|
|
12967
|
+
const value = this.allowObjectBinding ? getValue((this.fields.value) ? this.fields.value : '', val) : val;
|
|
12968
|
+
return itemValue === value;
|
|
12969
|
+
});
|
|
12970
|
+
});
|
|
12971
|
+
if (allItemsInValue) {
|
|
12972
|
+
ulElement.innerHTML = '';
|
|
12973
|
+
list = [];
|
|
12974
|
+
}
|
|
12975
|
+
}
|
|
12949
12976
|
/* eslint-enable @typescript-eslint/no-unused-vars */
|
|
12950
12977
|
super.onActionComplete(ulElement, list, e);
|
|
12951
12978
|
this.skeletonCount = this.totalItemCount !== 0 && this.totalItemCount < (this.itemCount * 2) &&
|
|
@@ -13594,6 +13621,10 @@ let MultiSelect = class MultiSelect extends DropDownBase {
|
|
|
13594
13621
|
}
|
|
13595
13622
|
onBlurHandler(eve, isDocClickFromCheck) {
|
|
13596
13623
|
let target;
|
|
13624
|
+
if (this.isBlurDispatching && this.isAngular) {
|
|
13625
|
+
this.isBlurDispatching = false;
|
|
13626
|
+
return;
|
|
13627
|
+
}
|
|
13597
13628
|
if (!isNullOrUndefined(eve)) {
|
|
13598
13629
|
target = eve.relatedTarget;
|
|
13599
13630
|
}
|
|
@@ -13676,6 +13707,10 @@ let MultiSelect = class MultiSelect extends DropDownBase {
|
|
|
13676
13707
|
this.overAllWrapper.getElementsByClassName('e-float-text-content')[0] && this.floatLabelType !== 'Never')) {
|
|
13677
13708
|
this.overAllWrapper.getElementsByClassName('e-float-text-content')[0].classList.add('e-icon');
|
|
13678
13709
|
}
|
|
13710
|
+
this.isBlurDispatching = true;
|
|
13711
|
+
if (this.isAngular) {
|
|
13712
|
+
this.dispatchEvent(this.inputElement, 'blur');
|
|
13713
|
+
}
|
|
13679
13714
|
}
|
|
13680
13715
|
calculateWidth() {
|
|
13681
13716
|
let elementWidth;
|
|
@@ -15310,6 +15345,10 @@ let MultiSelect = class MultiSelect extends DropDownBase {
|
|
|
15310
15345
|
if (!this.list) {
|
|
15311
15346
|
super.render();
|
|
15312
15347
|
}
|
|
15348
|
+
if (this.popupObj && document.body.contains(this.popupObj.element) && this.allowFiltering) {
|
|
15349
|
+
this.refreshPopup();
|
|
15350
|
+
return;
|
|
15351
|
+
}
|
|
15313
15352
|
if (!this.popupObj) {
|
|
15314
15353
|
if (!isNullOrUndefined(this.popupWrapper)) {
|
|
15315
15354
|
document.body.appendChild(this.popupWrapper);
|
|
@@ -15801,6 +15840,7 @@ let MultiSelect = class MultiSelect extends DropDownBase {
|
|
|
15801
15840
|
cancel: false
|
|
15802
15841
|
};
|
|
15803
15842
|
this.trigger('filtering', eventArgs, (eventArgs) => {
|
|
15843
|
+
this.isFilterPrevented = eventArgs.cancel;
|
|
15804
15844
|
if (!eventArgs.cancel) {
|
|
15805
15845
|
if (!this.isFiltered && !eventArgs.preventDefaultAction) {
|
|
15806
15846
|
this.filterAction = true;
|
|
@@ -21327,7 +21367,7 @@ let ListBox = ListBox_1 = class ListBox extends DropDownBase {
|
|
|
21327
21367
|
}
|
|
21328
21368
|
}
|
|
21329
21369
|
KeyUp(e) {
|
|
21330
|
-
if (this.allowFiltering && e.ctrlKey && e.keyCode === 65) {
|
|
21370
|
+
if (this.allowFiltering && ((e.ctrlKey && e.keyCode === 65) || (e.keyCode === 8 && !this.filterInput.value))) {
|
|
21331
21371
|
e.preventDefault();
|
|
21332
21372
|
return;
|
|
21333
21373
|
}
|
|
@@ -22061,7 +22101,9 @@ let Mention = class Mention extends DropDownBase {
|
|
|
22061
22101
|
? document.querySelector(this.target)
|
|
22062
22102
|
: this.target) : this.element;
|
|
22063
22103
|
if (this.isContentEditable(this.inputElement)) {
|
|
22064
|
-
this.inputElement.
|
|
22104
|
+
if (!this.inputElement.hasAttribute('contenteditable')) {
|
|
22105
|
+
this.inputElement.setAttribute('contenteditable', 'true');
|
|
22106
|
+
}
|
|
22065
22107
|
addClass([this.inputElement], ['e-mention']);
|
|
22066
22108
|
if (isNullOrUndefined(this.target)) {
|
|
22067
22109
|
addClass([this.inputElement], ['e-editable-element']);
|