@syncfusion/ej2-dropdowns 22.1.34 → 22.1.37
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 +16 -0
- 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 +25 -2
- package/dist/es6/ej2-dropdowns.es2015.js.map +1 -1
- package/dist/es6/ej2-dropdowns.es5.js +25 -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 +8 -8
- package/src/combo-box/combo-box.js +2 -0
- package/src/drop-down-base/drop-down-base.d.ts +1 -0
- 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 +14 -0
- package/src/list-box/list-box.js +1 -1
- package/src/mention/mention.d.ts +1 -0
- package/src/mention/mention.js +5 -0
- package/styles/material3-dark.css +0 -6
- package/styles/material3.css +0 -6
- package/styles/multi-select/_layout.scss +4 -2
- package/styles/multi-select/material3-dark.css +0 -6
- package/styles/multi-select/material3.css +0 -6
|
@@ -282,6 +282,7 @@ var DropDownBase = /** @__PURE__ @class */ (function (_super) {
|
|
|
282
282
|
_this.isPreventChange = false;
|
|
283
283
|
_this.isDynamicDataChange = false;
|
|
284
284
|
_this.addedNewItem = false;
|
|
285
|
+
_this.isAddNewItemTemplate = false;
|
|
285
286
|
return _this;
|
|
286
287
|
}
|
|
287
288
|
DropDownBase.prototype.getPropObject = function (prop, newProp, oldProp) {
|
|
@@ -464,7 +465,7 @@ var DropDownBase = /** @__PURE__ @class */ (function (_super) {
|
|
|
464
465
|
else {
|
|
465
466
|
var l10nLocale = { noRecordsTemplate: 'No records found', actionFailureTemplate: 'Request failed' };
|
|
466
467
|
var componentLocale = new L10n(this.getLocaleName(), {}, this.locale);
|
|
467
|
-
if (componentLocale.getConstant('actionFailureTemplate') !== '') {
|
|
468
|
+
if (componentLocale.getConstant('actionFailureTemplate') !== '' || componentLocale.getConstant('noRecordsTemplate') !== '') {
|
|
468
469
|
this.l10n = componentLocale;
|
|
469
470
|
}
|
|
470
471
|
else {
|
|
@@ -1333,6 +1334,7 @@ var DropDownBase = /** @__PURE__ @class */ (function (_super) {
|
|
|
1333
1334
|
if (!isNullOrUndefined(this.list)) {
|
|
1334
1335
|
this.list.innerHTML = '';
|
|
1335
1336
|
this.list.classList.remove(dropDownBaseClasses.noData);
|
|
1337
|
+
this.isAddNewItemTemplate = true;
|
|
1336
1338
|
if (!isNullOrUndefined(this.ulElement)) {
|
|
1337
1339
|
this.list.appendChild(this.ulElement);
|
|
1338
1340
|
}
|
|
@@ -2010,6 +2012,7 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
|
|
|
2010
2012
|
EventHandler.add(this.inputWrapper.container, 'mousedown', this.dropDownClick, this);
|
|
2011
2013
|
EventHandler.add(this.inputWrapper.container, 'focus', this.focusIn, this);
|
|
2012
2014
|
EventHandler.add(this.inputWrapper.container, 'keypress', this.onSearch, this);
|
|
2015
|
+
EventHandler.add(window, 'resize', this.windowResize, this);
|
|
2013
2016
|
this.bindCommonEvent();
|
|
2014
2017
|
};
|
|
2015
2018
|
DropDownList.prototype.bindCommonEvent = function () {
|
|
@@ -2030,6 +2033,11 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
|
|
|
2030
2033
|
}
|
|
2031
2034
|
this.bindClearEvent();
|
|
2032
2035
|
};
|
|
2036
|
+
DropDownList.prototype.windowResize = function () {
|
|
2037
|
+
if (this.isPopupOpen) {
|
|
2038
|
+
this.popupObj.refreshPosition(this.inputWrapper.container);
|
|
2039
|
+
}
|
|
2040
|
+
};
|
|
2033
2041
|
DropDownList.prototype.bindClearEvent = function () {
|
|
2034
2042
|
if (this.showClearButton) {
|
|
2035
2043
|
EventHandler.add(this.inputWrapper.clearButton, 'mousedown', this.resetHandler, this);
|
|
@@ -2355,6 +2363,7 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
|
|
|
2355
2363
|
EventHandler.remove(this.inputWrapper.container, 'mousedown', this.dropDownClick);
|
|
2356
2364
|
EventHandler.remove(this.inputWrapper.container, 'keypress', this.onSearch);
|
|
2357
2365
|
EventHandler.remove(this.inputWrapper.container, 'focus', this.focusIn);
|
|
2366
|
+
EventHandler.remove(window, 'resize', this.windowResize);
|
|
2358
2367
|
}
|
|
2359
2368
|
this.unBindCommonEvent();
|
|
2360
2369
|
};
|
|
@@ -4157,6 +4166,10 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
|
|
|
4157
4166
|
if (!this.enabled) {
|
|
4158
4167
|
return;
|
|
4159
4168
|
}
|
|
4169
|
+
if (this.isReact && this.getModuleName() === 'combobox' && this.itemTemplate && this.isCustomFilter && this.isAddNewItemTemplate) {
|
|
4170
|
+
this.renderList();
|
|
4171
|
+
this.isAddNewItemTemplate = false;
|
|
4172
|
+
}
|
|
4160
4173
|
if (this.isFiltering() && this.dataSource instanceof DataManager && (this.actionData.list !== this.actionCompleteData.list) &&
|
|
4161
4174
|
this.actionData.list && this.actionData.ulElement) {
|
|
4162
4175
|
this.actionCompleteData = this.actionData;
|
|
@@ -4335,6 +4348,9 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
|
|
|
4335
4348
|
this.previousSelectedLI = null;
|
|
4336
4349
|
this.valueTempElement = null;
|
|
4337
4350
|
this.actionData.ulElement = null;
|
|
4351
|
+
if (this.inputElement && !isNullOrUndefined(this.inputElement.onchange)) {
|
|
4352
|
+
this.inputElement.onchange = null;
|
|
4353
|
+
}
|
|
4338
4354
|
_super.prototype.destroy.call(this);
|
|
4339
4355
|
};
|
|
4340
4356
|
/* eslint-disable valid-jsdoc, jsdoc/require-returns-description */
|
|
@@ -7735,6 +7751,7 @@ var ComboBox = /** @__PURE__ @class */ (function (_super) {
|
|
|
7735
7751
|
EventHandler.add(this.inputElement, 'keyup', this.onFilterUp, this);
|
|
7736
7752
|
EventHandler.add(this.inputElement, 'keydown', this.onFilterDown, this);
|
|
7737
7753
|
EventHandler.add(this.inputElement, 'paste', this.pasteHandler, this);
|
|
7754
|
+
EventHandler.add(window, 'resize', this.windowResize, this);
|
|
7738
7755
|
}
|
|
7739
7756
|
this.bindCommonEvent();
|
|
7740
7757
|
};
|
|
@@ -8089,6 +8106,7 @@ var ComboBox = /** @__PURE__ @class */ (function (_super) {
|
|
|
8089
8106
|
EventHandler.remove(this.inputElement, 'keyup', this.onFilterUp);
|
|
8090
8107
|
EventHandler.remove(this.inputElement, 'keydown', this.onFilterDown);
|
|
8091
8108
|
EventHandler.remove(this.inputElement, 'paste', this.pasteHandler);
|
|
8109
|
+
EventHandler.remove(window, 'resize', this.windowResize);
|
|
8092
8110
|
}
|
|
8093
8111
|
}
|
|
8094
8112
|
this.unBindCommonEvent();
|
|
@@ -14401,7 +14419,7 @@ var ListBox = /** @__PURE__ @class */ (function (_super) {
|
|
|
14401
14419
|
scrollParent = wrapper;
|
|
14402
14420
|
}
|
|
14403
14421
|
boundRect = scrollParent.getBoundingClientRect();
|
|
14404
|
-
if ((boundRect.y + scrollParent.offsetHeight) - (event.
|
|
14422
|
+
if ((boundRect.y + scrollParent.offsetHeight) - (event.clientY + scrollMoved) < 1) {
|
|
14405
14423
|
scrollParent.scrollTop = scrollParent.scrollTop + scrollHeight;
|
|
14406
14424
|
}
|
|
14407
14425
|
else if ((event.pageY - scrollMoved) - boundRect.y < 1) {
|
|
@@ -16618,6 +16636,7 @@ var Mention = /** @__PURE__ @class */ (function (_super) {
|
|
|
16618
16636
|
switch (e.action) {
|
|
16619
16637
|
case 'down':
|
|
16620
16638
|
case 'up':
|
|
16639
|
+
this.isUpDownKey = true;
|
|
16621
16640
|
this.updateUpDownAction(e);
|
|
16622
16641
|
break;
|
|
16623
16642
|
case 'tab':
|
|
@@ -16682,6 +16701,10 @@ var Mention = /** @__PURE__ @class */ (function (_super) {
|
|
|
16682
16701
|
};
|
|
16683
16702
|
Mention.prototype.onKeyUp = function (e) {
|
|
16684
16703
|
var rangetextContent;
|
|
16704
|
+
if (this.isUpDownKey && this.isPopupOpen && e.keyCode === 229) {
|
|
16705
|
+
this.isUpDownKey = false;
|
|
16706
|
+
return;
|
|
16707
|
+
}
|
|
16685
16708
|
this.isTyped = e.code !== 'Enter' && e.code !== 'Space' && e.code !== 'ArrowDown' && e.code !== 'ArrowUp' ? true : false;
|
|
16686
16709
|
if (document.activeElement != this.inputElement) {
|
|
16687
16710
|
this.inputElement.focus();
|