@syncfusion/ej2-dropdowns 22.1.36 → 22.1.38
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 +12 -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 +31 -1
- package/dist/es6/ej2-dropdowns.es2015.js.map +1 -1
- package/dist/es6/ej2-dropdowns.es5.js +47 -17
- 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 +10 -10
- package/src/combo-box/combo-box.js +2 -0
- package/src/drop-down-base/drop-down-base.js +1 -1
- package/src/drop-down-list/drop-down-list.d.ts +1 -0
- package/src/drop-down-list/drop-down-list.js +30 -16
- package/src/drop-down-tree/drop-down-tree.js +6 -0
- package/src/multi-select/multi-select.js +8 -0
- package/.eslintrc.json +0 -260
- package/tslint.json +0 -111
|
@@ -438,7 +438,7 @@ let DropDownBase = class DropDownBase extends Component {
|
|
|
438
438
|
else {
|
|
439
439
|
const l10nLocale = { noRecordsTemplate: 'No records found', actionFailureTemplate: 'Request failed' };
|
|
440
440
|
const componentLocale = new L10n(this.getLocaleName(), {}, this.locale);
|
|
441
|
-
if (componentLocale.getConstant('actionFailureTemplate') !== '') {
|
|
441
|
+
if (componentLocale.getConstant('actionFailureTemplate') !== '' || componentLocale.getConstant('noRecordsTemplate') !== '') {
|
|
442
442
|
this.l10n = componentLocale;
|
|
443
443
|
}
|
|
444
444
|
else {
|
|
@@ -1961,6 +1961,7 @@ let DropDownList = class DropDownList extends DropDownBase {
|
|
|
1961
1961
|
EventHandler.add(this.inputWrapper.container, 'mousedown', this.dropDownClick, this);
|
|
1962
1962
|
EventHandler.add(this.inputWrapper.container, 'focus', this.focusIn, this);
|
|
1963
1963
|
EventHandler.add(this.inputWrapper.container, 'keypress', this.onSearch, this);
|
|
1964
|
+
EventHandler.add(window, 'resize', this.windowResize, this);
|
|
1964
1965
|
this.bindCommonEvent();
|
|
1965
1966
|
}
|
|
1966
1967
|
bindCommonEvent() {
|
|
@@ -1981,6 +1982,11 @@ let DropDownList = class DropDownList extends DropDownBase {
|
|
|
1981
1982
|
}
|
|
1982
1983
|
this.bindClearEvent();
|
|
1983
1984
|
}
|
|
1985
|
+
windowResize() {
|
|
1986
|
+
if (this.isPopupOpen) {
|
|
1987
|
+
this.popupObj.refreshPosition(this.inputWrapper.container);
|
|
1988
|
+
}
|
|
1989
|
+
}
|
|
1984
1990
|
bindClearEvent() {
|
|
1985
1991
|
if (this.showClearButton) {
|
|
1986
1992
|
EventHandler.add(this.inputWrapper.clearButton, 'mousedown', this.resetHandler, this);
|
|
@@ -2306,6 +2312,7 @@ let DropDownList = class DropDownList extends DropDownBase {
|
|
|
2306
2312
|
EventHandler.remove(this.inputWrapper.container, 'mousedown', this.dropDownClick);
|
|
2307
2313
|
EventHandler.remove(this.inputWrapper.container, 'keypress', this.onSearch);
|
|
2308
2314
|
EventHandler.remove(this.inputWrapper.container, 'focus', this.focusIn);
|
|
2315
|
+
EventHandler.remove(window, 'resize', this.windowResize);
|
|
2309
2316
|
}
|
|
2310
2317
|
this.unBindCommonEvent();
|
|
2311
2318
|
}
|
|
@@ -3203,6 +3210,7 @@ let DropDownList = class DropDownList extends DropDownBase {
|
|
|
3203
3210
|
this.getFocusElement();
|
|
3204
3211
|
this.createPopup(popupEle, offsetValue, left);
|
|
3205
3212
|
this.checkCollision(popupEle);
|
|
3213
|
+
const popupLeft = this.enableRtl ? parseFloat(popupEle.style.left) - (this.ulElement.parentElement.offsetWidth - this.inputWrapper.container.offsetWidth) : 0;
|
|
3206
3214
|
if (Browser.isDevice) {
|
|
3207
3215
|
this.popupObj.element.classList.add(dropDownListClasses.device);
|
|
3208
3216
|
if (this.getModuleName() === 'dropdownlist' || (this.getModuleName() === 'combobox'
|
|
@@ -3255,6 +3263,9 @@ let DropDownList = class DropDownList extends DropDownBase {
|
|
|
3255
3263
|
this.beforePopupOpen = false;
|
|
3256
3264
|
this.destroyPopup();
|
|
3257
3265
|
}
|
|
3266
|
+
if (this.enableRtl && popupLeft > 0) {
|
|
3267
|
+
popupEle.style.left = popupLeft + "px";
|
|
3268
|
+
}
|
|
3258
3269
|
});
|
|
3259
3270
|
}
|
|
3260
3271
|
else {
|
|
@@ -4270,6 +4281,9 @@ let DropDownList = class DropDownList extends DropDownBase {
|
|
|
4270
4281
|
this.previousSelectedLI = null;
|
|
4271
4282
|
this.valueTempElement = null;
|
|
4272
4283
|
this.actionData.ulElement = null;
|
|
4284
|
+
if (this.inputElement && !isNullOrUndefined(this.inputElement.onchange)) {
|
|
4285
|
+
this.inputElement.onchange = null;
|
|
4286
|
+
}
|
|
4273
4287
|
super.destroy();
|
|
4274
4288
|
}
|
|
4275
4289
|
/* eslint-disable valid-jsdoc, jsdoc/require-returns-description */
|
|
@@ -4787,6 +4801,12 @@ let DropDownTree = class DropDownTree extends Component {
|
|
|
4787
4801
|
}
|
|
4788
4802
|
this.treeObj.fields = this.getTreeFields(fields);
|
|
4789
4803
|
this.treeObj.dataBind();
|
|
4804
|
+
if (this.hasTemplate && this.portals) {
|
|
4805
|
+
this.portals = [].concat(this.treeObj.portals);
|
|
4806
|
+
if (this.isReact) {
|
|
4807
|
+
this.renderReactTemplates();
|
|
4808
|
+
}
|
|
4809
|
+
}
|
|
4790
4810
|
}
|
|
4791
4811
|
});
|
|
4792
4812
|
}
|
|
@@ -7618,6 +7638,7 @@ let ComboBox = class ComboBox extends DropDownList {
|
|
|
7618
7638
|
EventHandler.add(this.inputElement, 'keyup', this.onFilterUp, this);
|
|
7619
7639
|
EventHandler.add(this.inputElement, 'keydown', this.onFilterDown, this);
|
|
7620
7640
|
EventHandler.add(this.inputElement, 'paste', this.pasteHandler, this);
|
|
7641
|
+
EventHandler.add(window, 'resize', this.windowResize, this);
|
|
7621
7642
|
}
|
|
7622
7643
|
this.bindCommonEvent();
|
|
7623
7644
|
}
|
|
@@ -7970,6 +7991,7 @@ let ComboBox = class ComboBox extends DropDownList {
|
|
|
7970
7991
|
EventHandler.remove(this.inputElement, 'keyup', this.onFilterUp);
|
|
7971
7992
|
EventHandler.remove(this.inputElement, 'keydown', this.onFilterDown);
|
|
7972
7993
|
EventHandler.remove(this.inputElement, 'paste', this.pasteHandler);
|
|
7994
|
+
EventHandler.remove(window, 'resize', this.windowResize);
|
|
7973
7995
|
}
|
|
7974
7996
|
}
|
|
7975
7997
|
this.unBindCommonEvent();
|
|
@@ -9197,6 +9219,9 @@ let MultiSelect = class MultiSelect extends DropDownBase {
|
|
|
9197
9219
|
if (this.isFirstClick) {
|
|
9198
9220
|
this.loadTemplate();
|
|
9199
9221
|
}
|
|
9222
|
+
if (this.enableRtl) {
|
|
9223
|
+
this.popupWrapper.style.visibility = 'hidden';
|
|
9224
|
+
}
|
|
9200
9225
|
}
|
|
9201
9226
|
});
|
|
9202
9227
|
}
|
|
@@ -11060,6 +11085,11 @@ let MultiSelect = class MultiSelect extends DropDownBase {
|
|
|
11060
11085
|
},
|
|
11061
11086
|
open: () => {
|
|
11062
11087
|
this.popupObj.resolveCollision();
|
|
11088
|
+
if (this.enableRtl) {
|
|
11089
|
+
const popupLeft = parseFloat(this.popupWrapper.style.left) - (this.popupWrapper.offsetWidth - this.overAllWrapper.offsetWidth);
|
|
11090
|
+
this.popupWrapper.style.left = popupLeft > 0 ? popupLeft + "px" : this.popupWrapper.style.left;
|
|
11091
|
+
this.popupWrapper.style.visibility = 'hidden';
|
|
11092
|
+
}
|
|
11063
11093
|
if (!this.isFirstClick) {
|
|
11064
11094
|
const ulElement = this.list.querySelector('ul');
|
|
11065
11095
|
if (ulElement) {
|