@syncfusion/ej2-dropdowns 24.1.46 → 24.2.3
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 +48 -27
- package/dist/es6/ej2-dropdowns.es2015.js.map +1 -1
- package/dist/es6/ej2-dropdowns.es5.js +48 -27
- 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 +12 -12
- package/src/drop-down-base/drop-down-base.js +26 -20
- package/src/list-box/list-box.js +13 -0
- package/src/mention/mention.js +6 -6
- package/src/multi-select/multi-select.js +3 -1
- package/styles/bootstrap-dark.css +0 -5
- package/styles/bootstrap.css +0 -5
- package/styles/bootstrap4.css +0 -5
- package/styles/bootstrap5-dark.css +0 -5
- package/styles/bootstrap5.css +0 -5
- package/styles/drop-down-base/_layout.scss +0 -5
- package/styles/drop-down-base/bootstrap-dark.css +0 -5
- package/styles/drop-down-base/bootstrap.css +0 -5
- package/styles/drop-down-base/bootstrap4.css +0 -5
- package/styles/drop-down-base/bootstrap5-dark.css +0 -5
- package/styles/drop-down-base/bootstrap5.css +0 -5
- package/styles/drop-down-base/fabric-dark.css +0 -5
- package/styles/drop-down-base/fabric.css +0 -5
- package/styles/drop-down-base/fluent-dark.css +0 -5
- package/styles/drop-down-base/fluent.css +0 -5
- package/styles/drop-down-base/highcontrast-light.css +0 -5
- package/styles/drop-down-base/highcontrast.css +0 -5
- package/styles/drop-down-base/material-dark.css +0 -5
- package/styles/drop-down-base/material.css +0 -5
- package/styles/drop-down-base/material3-dark.css +0 -5
- package/styles/drop-down-base/material3.css +0 -5
- package/styles/drop-down-base/tailwind-dark.css +0 -5
- package/styles/drop-down-base/tailwind.css +0 -5
- package/styles/fabric-dark.css +0 -5
- package/styles/fabric.css +0 -5
- package/styles/fluent-dark.css +0 -5
- package/styles/fluent.css +0 -5
- package/styles/highcontrast-light.css +0 -5
- package/styles/highcontrast.css +0 -5
- package/styles/material-dark.css +0 -5
- package/styles/material.css +0 -5
- package/styles/material3-dark.css +0 -5
- package/styles/material3.css +0 -5
- package/styles/tailwind-dark.css +0 -5
- package/styles/tailwind.css +0 -5
|
@@ -1361,24 +1361,27 @@ let DropDownBase = class DropDownBase extends Component {
|
|
|
1361
1361
|
* @returns {HTMLElement} Return the ul li list items.
|
|
1362
1362
|
*/
|
|
1363
1363
|
createListItems(dataSource, fields) {
|
|
1364
|
-
if (dataSource
|
|
1365
|
-
if (fields.groupBy) {
|
|
1366
|
-
if (
|
|
1367
|
-
|
|
1364
|
+
if (dataSource) {
|
|
1365
|
+
if (fields.groupBy || this.element.querySelector('optgroup')) {
|
|
1366
|
+
if (fields.groupBy) {
|
|
1367
|
+
if (this.sortOrder !== 'None') {
|
|
1368
|
+
dataSource = this.getSortedDataSource(dataSource);
|
|
1369
|
+
}
|
|
1370
|
+
dataSource = ListBase.groupDataSource(dataSource, fields.properties, this.sortOrder);
|
|
1368
1371
|
}
|
|
1369
|
-
|
|
1372
|
+
addClass([this.list], dropDownBaseClasses.grouping);
|
|
1370
1373
|
}
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1374
|
+
else {
|
|
1375
|
+
dataSource = this.getSortedDataSource(dataSource);
|
|
1376
|
+
}
|
|
1377
|
+
const options = this.listOption(dataSource, fields);
|
|
1378
|
+
const spliceData = (dataSource.length > 100) ?
|
|
1379
|
+
new DataManager(dataSource).executeLocal(new Query().take(100))
|
|
1380
|
+
: dataSource;
|
|
1381
|
+
this.sortedData = dataSource;
|
|
1382
|
+
return ListBase.createList(this.createElement, (this.getModuleName() === 'autocomplete') ? spliceData : dataSource, options, true, this);
|
|
1375
1383
|
}
|
|
1376
|
-
|
|
1377
|
-
const spliceData = (dataSource.length > 100) ?
|
|
1378
|
-
new DataManager(dataSource).executeLocal(new Query().take(100))
|
|
1379
|
-
: dataSource;
|
|
1380
|
-
this.sortedData = dataSource;
|
|
1381
|
-
return ListBase.createList(this.createElement, (this.getModuleName() === 'autocomplete') ? spliceData : dataSource, options, true, this);
|
|
1384
|
+
return null;
|
|
1382
1385
|
}
|
|
1383
1386
|
listOption(dataSource, fields) {
|
|
1384
1387
|
const iconCss = isNullOrUndefined(fields.iconCss) ? false : true;
|
|
@@ -1466,7 +1469,8 @@ let DropDownBase = class DropDownBase extends Component {
|
|
|
1466
1469
|
}
|
|
1467
1470
|
updateGroupFixedHeader(element, target) {
|
|
1468
1471
|
this.fixedHeaderElement.innerHTML = element.innerHTML;
|
|
1469
|
-
this.fixedHeaderElement.style.
|
|
1472
|
+
this.fixedHeaderElement.style.position = 'fixed';
|
|
1473
|
+
this.fixedHeaderElement.style.top = this.list.parentElement.offsetTop + this.list.offsetTop + 'px';
|
|
1470
1474
|
this.fixedHeaderElement.style.display = 'block';
|
|
1471
1475
|
}
|
|
1472
1476
|
getValidLi() {
|
|
@@ -1641,10 +1645,12 @@ let DropDownBase = class DropDownBase extends Component {
|
|
|
1641
1645
|
getIndexByValueFilter(value) {
|
|
1642
1646
|
let index;
|
|
1643
1647
|
const listItems = this.renderItems(this.selectData, this.fields);
|
|
1644
|
-
|
|
1645
|
-
|
|
1646
|
-
|
|
1647
|
-
|
|
1648
|
+
if (listItems && listItems.children) {
|
|
1649
|
+
for (let i = 0; i < listItems.children.length; i++) {
|
|
1650
|
+
if (!isNullOrUndefined(value) && listItems.children[i].getAttribute('data-value') === value.toString()) {
|
|
1651
|
+
index = i;
|
|
1652
|
+
break;
|
|
1653
|
+
}
|
|
1648
1654
|
}
|
|
1649
1655
|
}
|
|
1650
1656
|
return index;
|
|
@@ -11106,7 +11112,9 @@ let MultiSelect = class MultiSelect extends DropDownBase {
|
|
|
11106
11112
|
}
|
|
11107
11113
|
if (activeElement && activeElement.item !== null) {
|
|
11108
11114
|
this.addListFocus(activeElement.item);
|
|
11109
|
-
this.
|
|
11115
|
+
if (((this.allowCustomValue || this.allowFiltering) && this.isPopupOpen() && this.closePopupOnSelect) || this.closePopupOnSelect) {
|
|
11116
|
+
this.scrollBottom(activeElement.item, activeElement.index);
|
|
11117
|
+
}
|
|
11110
11118
|
}
|
|
11111
11119
|
}
|
|
11112
11120
|
getAriaAttributes() {
|
|
@@ -16008,6 +16016,19 @@ let ListBox = ListBox_1 = class ListBox extends DropDownBase {
|
|
|
16008
16016
|
this.list.insertBefore(searchEle, this.list.firstElementChild);
|
|
16009
16017
|
this.filterParent = this.list.getElementsByClassName('e-filter-parent')[0];
|
|
16010
16018
|
this.filterWireEvents(searchEle);
|
|
16019
|
+
let inputSearch = searchEle.querySelector('.e-input-filter');
|
|
16020
|
+
if (inputSearch) {
|
|
16021
|
+
inputSearch.addEventListener('focus', function () {
|
|
16022
|
+
if (!searchEle.childNodes[0].classList.contains('e-input-focus')) {
|
|
16023
|
+
searchEle.childNodes[0].classList.add('e-input-focus');
|
|
16024
|
+
}
|
|
16025
|
+
});
|
|
16026
|
+
inputSearch.addEventListener('blur', function () {
|
|
16027
|
+
if (searchEle.childNodes[0].classList.contains('e-input-focus')) {
|
|
16028
|
+
searchEle.childNodes[0].classList.remove('e-input-focus');
|
|
16029
|
+
}
|
|
16030
|
+
});
|
|
16031
|
+
}
|
|
16011
16032
|
}
|
|
16012
16033
|
this.initWrapper();
|
|
16013
16034
|
this.setSelection();
|
|
@@ -19235,12 +19256,6 @@ let Mention = class Mention extends DropDownBase {
|
|
|
19235
19256
|
if (this.isPopupOpen) {
|
|
19236
19257
|
this.hidePopup();
|
|
19237
19258
|
}
|
|
19238
|
-
//New event to update the RichTextEditor value, when a mention item is selected using mouse click action.
|
|
19239
|
-
if (!isNullOrUndefined(e.pointerType) && e.pointerType === 'mouse') {
|
|
19240
|
-
const event = new CustomEvent('content-changed', { detail: { click: true } });
|
|
19241
|
-
this.inputElement.dispatchEvent(event);
|
|
19242
|
-
}
|
|
19243
|
-
|
|
19244
19259
|
this.onChangeEvent(e);
|
|
19245
19260
|
}
|
|
19246
19261
|
else {
|
|
@@ -19286,6 +19301,12 @@ let Mention = class Mention extends DropDownBase {
|
|
|
19286
19301
|
if (this.isPopupOpen) {
|
|
19287
19302
|
this.hidePopup();
|
|
19288
19303
|
}
|
|
19304
|
+
//New event to update the RichTextEditor value, when a mention item is selected using mouse click action.
|
|
19305
|
+
if (!isNullOrUndefined(e.pointerType) && e.pointerType === 'mouse') {
|
|
19306
|
+
const event = new CustomEvent('content-changed', { detail: { click: true } });
|
|
19307
|
+
this.inputElement.dispatchEvent(event);
|
|
19308
|
+
}
|
|
19309
|
+
|
|
19289
19310
|
this.onChangeEvent(e);
|
|
19290
19311
|
}
|
|
19291
19312
|
}
|