@syncfusion/ej2-dropdowns 29.2.4 → 29.2.5
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 +56 -42
- package/dist/es6/ej2-dropdowns.es2015.js.map +1 -1
- package/dist/es6/ej2-dropdowns.es5.js +63 -47
- 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-model.d.ts +1 -1
- package/src/combo-box/combo-box.js +22 -14
- package/src/drop-down-base/drop-down-base.js +17 -0
- package/src/drop-down-list/drop-down-list.js +10 -16
- package/src/drop-down-tree/drop-down-tree.js +3 -11
- package/src/multi-select/multi-select.js +11 -6
|
@@ -1816,6 +1816,13 @@ let DropDownBase = class DropDownBase extends Component {
|
|
|
1816
1816
|
}
|
|
1817
1817
|
}
|
|
1818
1818
|
}
|
|
1819
|
+
if (this.getModuleName() === 'multiselect' && this.isAngular && this.ngEle) {
|
|
1820
|
+
const popupHolder = this.list;
|
|
1821
|
+
if (popupHolder) {
|
|
1822
|
+
const prevHeight = popupHolder.offsetHeight + 'px';
|
|
1823
|
+
popupHolder.style.height = prevHeight;
|
|
1824
|
+
}
|
|
1825
|
+
}
|
|
1819
1826
|
if (!isNullOrUndefined(this.list)) {
|
|
1820
1827
|
if (!this.isVirtualizationEnabled) {
|
|
1821
1828
|
this.list.innerHTML = '';
|
|
@@ -1825,6 +1832,15 @@ let DropDownBase = class DropDownBase extends Component {
|
|
|
1825
1832
|
this.postRender(this.list, list, this.bindEvent);
|
|
1826
1833
|
}
|
|
1827
1834
|
}
|
|
1835
|
+
if (this.getModuleName() === 'multiselect' && this.isAngular && this.ngEle) {
|
|
1836
|
+
const popupHolder = this.list;
|
|
1837
|
+
if (popupHolder) {
|
|
1838
|
+
setTimeout(() => {
|
|
1839
|
+
popupHolder.style.height = '';
|
|
1840
|
+
this.refreshPopup();
|
|
1841
|
+
}, 0);
|
|
1842
|
+
}
|
|
1843
|
+
}
|
|
1828
1844
|
}
|
|
1829
1845
|
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
1830
1846
|
postRender(listElement, list, bindEvent) {
|
|
@@ -4288,7 +4304,8 @@ let DropDownList = class DropDownList extends DropDownBase {
|
|
|
4288
4304
|
// eslint-disable-next-line @typescript-eslint/no-this-alias
|
|
4289
4305
|
const proxy = this;
|
|
4290
4306
|
// eslint-disable-next-line max-len
|
|
4291
|
-
const duration = (this.
|
|
4307
|
+
const duration = ((this.dataSource instanceof DataManager) && this.groupTemplate) ? 700 :
|
|
4308
|
+
(this.element.tagName === this.getNgDirective() && this.itemTemplate) ? 500 : 100;
|
|
4292
4309
|
if (!this.isSecondClick) {
|
|
4293
4310
|
setTimeout(() => {
|
|
4294
4311
|
proxy.cloneElements();
|
|
@@ -5191,16 +5208,6 @@ let DropDownList = class DropDownList extends DropDownBase {
|
|
|
5191
5208
|
if (!this.enableVirtualization) {
|
|
5192
5209
|
this.addItem(e.result, list.length);
|
|
5193
5210
|
}
|
|
5194
|
-
else {
|
|
5195
|
-
this.itemData = e.result[0];
|
|
5196
|
-
const dataItem = this.getItemData();
|
|
5197
|
-
const value = this.allowObjectBinding ?
|
|
5198
|
-
this.getDataByValue(dataItem.value) : dataItem.value;
|
|
5199
|
-
if ((this.value === dataItem.value && this.text !== dataItem.text) ||
|
|
5200
|
-
(this.value !== dataItem.value && this.text === dataItem.text)) {
|
|
5201
|
-
this.setProperties({ 'text': dataItem.text ? dataItem.text.toString() : dataItem.text, 'value': value });
|
|
5202
|
-
}
|
|
5203
|
-
}
|
|
5204
5211
|
this.updateValues();
|
|
5205
5212
|
}
|
|
5206
5213
|
else {
|
|
@@ -6876,6 +6883,9 @@ let DropDownList = class DropDownList extends DropDownBase {
|
|
|
6876
6883
|
if (!this.enabled) {
|
|
6877
6884
|
return;
|
|
6878
6885
|
}
|
|
6886
|
+
if (this.getModuleName() === 'dropdownlist' && this.beforePopupOpen && !this.isPopupOpen) {
|
|
6887
|
+
this.beforePopupOpen = false;
|
|
6888
|
+
}
|
|
6879
6889
|
this.firstItem = this.dataSource && this.dataSource.length > 0 ? this.dataSource[0] : null;
|
|
6880
6890
|
if (this.isReact && this.getModuleName() === 'combobox' && this.itemTemplate && this.isCustomFilter && this.isAddNewItemTemplate) {
|
|
6881
6891
|
this.renderList();
|
|
@@ -8910,7 +8920,8 @@ let DropDownTree = class DropDownTree extends Component {
|
|
|
8910
8920
|
loadOnDemand: this.treeSettings.loadOnDemand,
|
|
8911
8921
|
nodeSelecting: this.onBeforeSelect.bind(this),
|
|
8912
8922
|
nodeTemplate: this.itemTemplate,
|
|
8913
|
-
checkDisabledChildren: this.treeSettings.checkDisabledChildren
|
|
8923
|
+
checkDisabledChildren: this.treeSettings.checkDisabledChildren,
|
|
8924
|
+
checkOnClick: true
|
|
8914
8925
|
});
|
|
8915
8926
|
this.treeObj.root = this.root ? this.root : this;
|
|
8916
8927
|
this.treeObj.appendTo(this.tree);
|
|
@@ -8988,7 +8999,7 @@ let DropDownTree = class DropDownTree extends Component {
|
|
|
8988
8999
|
this.popupObj.refreshPosition();
|
|
8989
9000
|
if (!(this.showSelectAll || this.allowFiltering) && (!this.popupDiv.classList.contains(NODATA)
|
|
8990
9001
|
&& this.treeItems.length > 0)) {
|
|
8991
|
-
let focusedElement = this.value != null && this.text != null ? this.treeObj.element.querySelector('[data-uid="' + this.value[
|
|
9002
|
+
let focusedElement = this.value != null && this.text != null ? this.treeObj.element.querySelector('[data-uid="' + this.value[this.value.length - 1] + '"]') : null;
|
|
8992
9003
|
if (focusedElement) {
|
|
8993
9004
|
this.treeObj.element.querySelector('li').setAttribute('tabindex', '-1');
|
|
8994
9005
|
focusedElement.setAttribute('tabindex', '0');
|
|
@@ -9434,15 +9445,6 @@ let DropDownTree = class DropDownTree extends Component {
|
|
|
9434
9445
|
}
|
|
9435
9446
|
const target = args.event.target;
|
|
9436
9447
|
if ((target.classList.contains('e-fullrow') || target.classList.contains('e-list-text')) && this.showCheckBox) {
|
|
9437
|
-
this.isClicked = true;
|
|
9438
|
-
const getNodeDetails = this.treeObj.getNode(args.node);
|
|
9439
|
-
if (getNodeDetails.isChecked === 'true') {
|
|
9440
|
-
this.treeObj.uncheckAll([args.node]);
|
|
9441
|
-
}
|
|
9442
|
-
else {
|
|
9443
|
-
this.treeObj.checkAll([args.node]);
|
|
9444
|
-
}
|
|
9445
|
-
this.isClicked = false;
|
|
9446
9448
|
this.setMultiSelect();
|
|
9447
9449
|
this.ensurePlaceHolder();
|
|
9448
9450
|
}
|
|
@@ -11029,19 +11031,22 @@ let ComboBox = class ComboBox extends DropDownList {
|
|
|
11029
11031
|
const fields = (this.fields.value) ? this.fields.value : '';
|
|
11030
11032
|
const currentValue = this.allowObjectBinding && !isNullOrUndefined(this.value) ? getValue((this.fields.value) ? this.fields.value : '', this.value) : this.value;
|
|
11031
11033
|
if (this.dataSource instanceof DataManager) {
|
|
11032
|
-
|
|
11033
|
-
|
|
11034
|
-
|
|
11035
|
-
|
|
11036
|
-
|
|
11037
|
-
|
|
11038
|
-
|
|
11039
|
-
|
|
11040
|
-
|
|
11041
|
-
|
|
11042
|
-
|
|
11034
|
+
this.dataSource.executeQuery(new Query().where(new Predicate(fields, 'equal', currentValue)))
|
|
11035
|
+
.then((e) => {
|
|
11036
|
+
if (e.result.length > 0) {
|
|
11037
|
+
this.itemData = e.result[0];
|
|
11038
|
+
const dataItem = this.getItemData();
|
|
11039
|
+
const value = this.allowObjectBinding ?
|
|
11040
|
+
this.getDataByValue(dataItem.value) : dataItem.value;
|
|
11041
|
+
if ((this.value === dataItem.value && this.text !== dataItem.text) ||
|
|
11042
|
+
(this.value !== dataItem.value && this.text === dataItem.text)) {
|
|
11043
|
+
this.setProperties({ 'text': dataItem.text ? dataItem.text.toString() : dataItem.text, 'value': value });
|
|
11044
|
+
}
|
|
11043
11045
|
}
|
|
11044
|
-
|
|
11046
|
+
else {
|
|
11047
|
+
this.valueMuteChange(null);
|
|
11048
|
+
}
|
|
11049
|
+
});
|
|
11045
11050
|
}
|
|
11046
11051
|
else {
|
|
11047
11052
|
const getItem = new DataManager(this.dataSource).executeLocal(new Query().where(new Predicate(fields, 'equal', currentValue)));
|
|
@@ -11069,7 +11074,8 @@ let ComboBox = class ComboBox extends DropDownList {
|
|
|
11069
11074
|
(this.allowCustom && this.enableVirtualization && !doesItemExist)) {
|
|
11070
11075
|
this.valueMuteChange(this.value);
|
|
11071
11076
|
}
|
|
11072
|
-
else if (!this.enableVirtualization || (this.enableVirtualization && !
|
|
11077
|
+
else if (!this.enableVirtualization || (this.enableVirtualization && !(this.dataSource instanceof DataManager)
|
|
11078
|
+
&& !doesItemExist)) {
|
|
11073
11079
|
this.valueMuteChange(null);
|
|
11074
11080
|
}
|
|
11075
11081
|
}
|
|
@@ -11232,7 +11238,10 @@ let ComboBox = class ComboBox extends DropDownList {
|
|
|
11232
11238
|
}
|
|
11233
11239
|
}
|
|
11234
11240
|
const activeElement = activeItem.item;
|
|
11235
|
-
|
|
11241
|
+
const dataItem = this.getItemData();
|
|
11242
|
+
if ((!isNullOrUndefined(activeElement) && !this.enableVirtualization) || (this.enableVirtualization &&
|
|
11243
|
+
this.isTyped && isNullOrUndefined(dataItem) && isNullOrUndefined(dataItem.value) &&
|
|
11244
|
+
dataItem.value.toString() === activeElement.getAttribute('data-value').toString())) {
|
|
11236
11245
|
const count = this.getIndexByValue(activeElement.getAttribute('data-value')) - 1;
|
|
11237
11246
|
const height = parseInt(getComputedStyle(this.liCollections[0], null).getPropertyValue('height'), 10);
|
|
11238
11247
|
if (!isNaN(height) && this.getModuleName() !== 'autocomplete') {
|
|
@@ -13818,13 +13827,18 @@ let MultiSelect = class MultiSelect extends DropDownBase {
|
|
|
13818
13827
|
this.checkAndScrollParent();
|
|
13819
13828
|
}
|
|
13820
13829
|
checkAndScrollParent() {
|
|
13821
|
-
|
|
13822
|
-
|
|
13823
|
-
const
|
|
13824
|
-
const
|
|
13825
|
-
if (!isNaN(
|
|
13826
|
-
|
|
13830
|
+
let scrollElement = this.overAllWrapper ? this.overAllWrapper.parentElement : null;
|
|
13831
|
+
while (scrollElement) {
|
|
13832
|
+
const scrollElementStyle = getComputedStyle(scrollElement);
|
|
13833
|
+
const scrollElmentHeight = parseFloat(scrollElementStyle.maxHeight) || parseFloat(scrollElementStyle.height);
|
|
13834
|
+
if (!isNaN(scrollElmentHeight)) {
|
|
13835
|
+
const overflowY = scrollElementStyle.overflowY;
|
|
13836
|
+
if (overflowY === 'auto' || overflowY === 'scroll') {
|
|
13837
|
+
scrollElement.scrollTop = scrollElement.scrollHeight;
|
|
13838
|
+
return;
|
|
13839
|
+
}
|
|
13827
13840
|
}
|
|
13841
|
+
scrollElement = scrollElement.parentElement;
|
|
13828
13842
|
}
|
|
13829
13843
|
}
|
|
13830
13844
|
enable(state) {
|