@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
|
@@ -258,6 +258,7 @@ let DropDownBase = class DropDownBase extends Component {
|
|
|
258
258
|
this.isPreventChange = false;
|
|
259
259
|
this.isDynamicDataChange = false;
|
|
260
260
|
this.addedNewItem = false;
|
|
261
|
+
this.isAddNewItemTemplate = false;
|
|
261
262
|
}
|
|
262
263
|
getPropObject(prop, newProp, oldProp) {
|
|
263
264
|
const newProperty = new Object();
|
|
@@ -437,7 +438,7 @@ let DropDownBase = class DropDownBase extends Component {
|
|
|
437
438
|
else {
|
|
438
439
|
const l10nLocale = { noRecordsTemplate: 'No records found', actionFailureTemplate: 'Request failed' };
|
|
439
440
|
const componentLocale = new L10n(this.getLocaleName(), {}, this.locale);
|
|
440
|
-
if (componentLocale.getConstant('actionFailureTemplate') !== '') {
|
|
441
|
+
if (componentLocale.getConstant('actionFailureTemplate') !== '' || componentLocale.getConstant('noRecordsTemplate') !== '') {
|
|
441
442
|
this.l10n = componentLocale;
|
|
442
443
|
}
|
|
443
444
|
else {
|
|
@@ -1302,6 +1303,7 @@ let DropDownBase = class DropDownBase extends Component {
|
|
|
1302
1303
|
if (!isNullOrUndefined(this.list)) {
|
|
1303
1304
|
this.list.innerHTML = '';
|
|
1304
1305
|
this.list.classList.remove(dropDownBaseClasses.noData);
|
|
1306
|
+
this.isAddNewItemTemplate = true;
|
|
1305
1307
|
if (!isNullOrUndefined(this.ulElement)) {
|
|
1306
1308
|
this.list.appendChild(this.ulElement);
|
|
1307
1309
|
}
|
|
@@ -1959,6 +1961,7 @@ let DropDownList = class DropDownList extends DropDownBase {
|
|
|
1959
1961
|
EventHandler.add(this.inputWrapper.container, 'mousedown', this.dropDownClick, this);
|
|
1960
1962
|
EventHandler.add(this.inputWrapper.container, 'focus', this.focusIn, this);
|
|
1961
1963
|
EventHandler.add(this.inputWrapper.container, 'keypress', this.onSearch, this);
|
|
1964
|
+
EventHandler.add(window, 'resize', this.windowResize, this);
|
|
1962
1965
|
this.bindCommonEvent();
|
|
1963
1966
|
}
|
|
1964
1967
|
bindCommonEvent() {
|
|
@@ -1979,6 +1982,11 @@ let DropDownList = class DropDownList extends DropDownBase {
|
|
|
1979
1982
|
}
|
|
1980
1983
|
this.bindClearEvent();
|
|
1981
1984
|
}
|
|
1985
|
+
windowResize() {
|
|
1986
|
+
if (this.isPopupOpen) {
|
|
1987
|
+
this.popupObj.refreshPosition(this.inputWrapper.container);
|
|
1988
|
+
}
|
|
1989
|
+
}
|
|
1982
1990
|
bindClearEvent() {
|
|
1983
1991
|
if (this.showClearButton) {
|
|
1984
1992
|
EventHandler.add(this.inputWrapper.clearButton, 'mousedown', this.resetHandler, this);
|
|
@@ -2304,6 +2312,7 @@ let DropDownList = class DropDownList extends DropDownBase {
|
|
|
2304
2312
|
EventHandler.remove(this.inputWrapper.container, 'mousedown', this.dropDownClick);
|
|
2305
2313
|
EventHandler.remove(this.inputWrapper.container, 'keypress', this.onSearch);
|
|
2306
2314
|
EventHandler.remove(this.inputWrapper.container, 'focus', this.focusIn);
|
|
2315
|
+
EventHandler.remove(window, 'resize', this.windowResize);
|
|
2307
2316
|
}
|
|
2308
2317
|
this.unBindCommonEvent();
|
|
2309
2318
|
}
|
|
@@ -4086,6 +4095,10 @@ let DropDownList = class DropDownList extends DropDownBase {
|
|
|
4086
4095
|
if (!this.enabled) {
|
|
4087
4096
|
return;
|
|
4088
4097
|
}
|
|
4098
|
+
if (this.isReact && this.getModuleName() === 'combobox' && this.itemTemplate && this.isCustomFilter && this.isAddNewItemTemplate) {
|
|
4099
|
+
this.renderList();
|
|
4100
|
+
this.isAddNewItemTemplate = false;
|
|
4101
|
+
}
|
|
4089
4102
|
if (this.isFiltering() && this.dataSource instanceof DataManager && (this.actionData.list !== this.actionCompleteData.list) &&
|
|
4090
4103
|
this.actionData.list && this.actionData.ulElement) {
|
|
4091
4104
|
this.actionCompleteData = this.actionData;
|
|
@@ -4264,6 +4277,9 @@ let DropDownList = class DropDownList extends DropDownBase {
|
|
|
4264
4277
|
this.previousSelectedLI = null;
|
|
4265
4278
|
this.valueTempElement = null;
|
|
4266
4279
|
this.actionData.ulElement = null;
|
|
4280
|
+
if (this.inputElement && !isNullOrUndefined(this.inputElement.onchange)) {
|
|
4281
|
+
this.inputElement.onchange = null;
|
|
4282
|
+
}
|
|
4267
4283
|
super.destroy();
|
|
4268
4284
|
}
|
|
4269
4285
|
/* eslint-disable valid-jsdoc, jsdoc/require-returns-description */
|
|
@@ -7612,6 +7628,7 @@ let ComboBox = class ComboBox extends DropDownList {
|
|
|
7612
7628
|
EventHandler.add(this.inputElement, 'keyup', this.onFilterUp, this);
|
|
7613
7629
|
EventHandler.add(this.inputElement, 'keydown', this.onFilterDown, this);
|
|
7614
7630
|
EventHandler.add(this.inputElement, 'paste', this.pasteHandler, this);
|
|
7631
|
+
EventHandler.add(window, 'resize', this.windowResize, this);
|
|
7615
7632
|
}
|
|
7616
7633
|
this.bindCommonEvent();
|
|
7617
7634
|
}
|
|
@@ -7964,6 +7981,7 @@ let ComboBox = class ComboBox extends DropDownList {
|
|
|
7964
7981
|
EventHandler.remove(this.inputElement, 'keyup', this.onFilterUp);
|
|
7965
7982
|
EventHandler.remove(this.inputElement, 'keydown', this.onFilterDown);
|
|
7966
7983
|
EventHandler.remove(this.inputElement, 'paste', this.pasteHandler);
|
|
7984
|
+
EventHandler.remove(window, 'resize', this.windowResize);
|
|
7967
7985
|
}
|
|
7968
7986
|
}
|
|
7969
7987
|
this.unBindCommonEvent();
|
|
@@ -14187,7 +14205,7 @@ let ListBox = ListBox_1 = class ListBox extends DropDownBase {
|
|
|
14187
14205
|
scrollParent = wrapper;
|
|
14188
14206
|
}
|
|
14189
14207
|
boundRect = scrollParent.getBoundingClientRect();
|
|
14190
|
-
if ((boundRect.y + scrollParent.offsetHeight) - (event.
|
|
14208
|
+
if ((boundRect.y + scrollParent.offsetHeight) - (event.clientY + scrollMoved) < 1) {
|
|
14191
14209
|
scrollParent.scrollTop = scrollParent.scrollTop + scrollHeight;
|
|
14192
14210
|
}
|
|
14193
14211
|
else if ((event.pageY - scrollMoved) - boundRect.y < 1) {
|
|
@@ -16357,6 +16375,7 @@ let Mention = class Mention extends DropDownBase {
|
|
|
16357
16375
|
switch (e.action) {
|
|
16358
16376
|
case 'down':
|
|
16359
16377
|
case 'up':
|
|
16378
|
+
this.isUpDownKey = true;
|
|
16360
16379
|
this.updateUpDownAction(e);
|
|
16361
16380
|
break;
|
|
16362
16381
|
case 'tab':
|
|
@@ -16421,6 +16440,10 @@ let Mention = class Mention extends DropDownBase {
|
|
|
16421
16440
|
}
|
|
16422
16441
|
onKeyUp(e) {
|
|
16423
16442
|
let rangetextContent;
|
|
16443
|
+
if (this.isUpDownKey && this.isPopupOpen && e.keyCode === 229) {
|
|
16444
|
+
this.isUpDownKey = false;
|
|
16445
|
+
return;
|
|
16446
|
+
}
|
|
16424
16447
|
this.isTyped = e.code !== 'Enter' && e.code !== 'Space' && e.code !== 'ArrowDown' && e.code !== 'ArrowUp' ? true : false;
|
|
16425
16448
|
if (document.activeElement != this.inputElement) {
|
|
16426
16449
|
this.inputElement.focus();
|