@syncfusion/ej2-dropdowns 25.2.4 → 25.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/CHANGELOG.md +20 -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 +56 -21
- package/dist/es6/ej2-dropdowns.es2015.js.map +1 -1
- package/dist/es6/ej2-dropdowns.es5.js +56 -21
- 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/drop-down-base/drop-down-base.d.ts +1 -1
- package/src/drop-down-base/drop-down-base.js +22 -11
- package/src/drop-down-list/drop-down-list.d.ts +1 -0
- package/src/drop-down-list/drop-down-list.js +31 -8
- package/src/drop-down-tree/drop-down-tree.js +2 -2
- package/src/multi-select/float-label.js +1 -0
- package/styles/material3-dark.css +10 -7
- package/styles/material3.css +10 -7
- package/styles/multi-select/_layout.scss +2 -2
- package/styles/multi-select/icons/_material3.scss +8 -5
- package/styles/multi-select/material3-dark.css +10 -7
- package/styles/multi-select/material3.css +10 -7
|
@@ -1856,10 +1856,14 @@ let DropDownBase = class DropDownBase extends Component {
|
|
|
1856
1856
|
}
|
|
1857
1857
|
}
|
|
1858
1858
|
updateGroupFixedHeader(element, target) {
|
|
1859
|
-
this.fixedHeaderElement
|
|
1860
|
-
|
|
1861
|
-
|
|
1862
|
-
|
|
1859
|
+
if (this.fixedHeaderElement) {
|
|
1860
|
+
if (!isNullOrUndefined(element.innerHTML)) {
|
|
1861
|
+
this.fixedHeaderElement.innerHTML = element.innerHTML;
|
|
1862
|
+
}
|
|
1863
|
+
this.fixedHeaderElement.style.position = 'fixed';
|
|
1864
|
+
this.fixedHeaderElement.style.top = (this.list.parentElement.offsetTop + this.list.offsetTop) - window.scrollY + 'px';
|
|
1865
|
+
this.fixedHeaderElement.style.display = 'block';
|
|
1866
|
+
}
|
|
1863
1867
|
}
|
|
1864
1868
|
getValidLi() {
|
|
1865
1869
|
if (this.isVirtualizationEnabled) {
|
|
@@ -2050,9 +2054,12 @@ let DropDownBase = class DropDownBase extends Component {
|
|
|
2050
2054
|
* @param {string | number | boolean} value - Specifies given value.
|
|
2051
2055
|
* @returns {number} Returns the index of the item.
|
|
2052
2056
|
*/
|
|
2053
|
-
getIndexByValueFilter(value) {
|
|
2057
|
+
getIndexByValueFilter(value, ulElement) {
|
|
2054
2058
|
let index;
|
|
2055
|
-
|
|
2059
|
+
if (!ulElement) {
|
|
2060
|
+
return null;
|
|
2061
|
+
}
|
|
2062
|
+
const listItems = ulElement.querySelectorAll('li' + ':not(.e-list-group-item)');
|
|
2056
2063
|
if (listItems) {
|
|
2057
2064
|
for (let i = 0; i < listItems.length; i++) {
|
|
2058
2065
|
if (!isNullOrUndefined(value) && listItems[i].getAttribute('data-value') === value.toString()) {
|
|
@@ -2216,6 +2223,7 @@ let DropDownBase = class DropDownBase extends Component {
|
|
|
2216
2223
|
const group = this.element.querySelector('select>optgroup');
|
|
2217
2224
|
if ((this.fields.groupBy || !isNullOrUndefined(group)) && !this.isGroupChecking) {
|
|
2218
2225
|
EventHandler.add(this.list, 'scroll', this.setFloatingHeader, this);
|
|
2226
|
+
EventHandler.add(document, 'scroll', this.updateGroupFixedHeader, this);
|
|
2219
2227
|
}
|
|
2220
2228
|
if (this.getModuleName() === 'dropdownbase') {
|
|
2221
2229
|
if (this.element.getAttribute('tabindex')) {
|
|
@@ -2467,12 +2475,15 @@ let DropDownBase = class DropDownBase extends Component {
|
|
|
2467
2475
|
* @returns {void}
|
|
2468
2476
|
*/
|
|
2469
2477
|
destroy() {
|
|
2470
|
-
if (document
|
|
2471
|
-
EventHandler.remove(
|
|
2472
|
-
if (
|
|
2473
|
-
this.
|
|
2478
|
+
if (document) {
|
|
2479
|
+
EventHandler.remove(document, 'scroll', this.updateGroupFixedHeader);
|
|
2480
|
+
if (document.body.contains(this.list)) {
|
|
2481
|
+
EventHandler.remove(this.list, 'scroll', this.setFloatingHeader);
|
|
2482
|
+
if (!isNullOrUndefined(this.rippleFun)) {
|
|
2483
|
+
this.rippleFun();
|
|
2484
|
+
}
|
|
2485
|
+
detach(this.list);
|
|
2474
2486
|
}
|
|
2475
|
-
detach(this.list);
|
|
2476
2487
|
}
|
|
2477
2488
|
this.liCollections = null;
|
|
2478
2489
|
this.ulElement = null;
|
|
@@ -2621,6 +2632,12 @@ let DropDownList = class DropDownList extends DropDownBase {
|
|
|
2621
2632
|
this.IsScrollerAtEnd = function () {
|
|
2622
2633
|
return this.list && this.list.scrollTop + this.list.clientHeight >= this.list.scrollHeight;
|
|
2623
2634
|
};
|
|
2635
|
+
this.removeAllChildren = function (element) {
|
|
2636
|
+
while (element.children[0]) {
|
|
2637
|
+
this.removeAllChildren(element.children[0]);
|
|
2638
|
+
element.removeChild(element.children[0]);
|
|
2639
|
+
}
|
|
2640
|
+
};
|
|
2624
2641
|
}
|
|
2625
2642
|
/**
|
|
2626
2643
|
* Initialize the event handler.
|
|
@@ -3507,7 +3524,7 @@ let DropDownList = class DropDownList extends DropDownBase {
|
|
|
3507
3524
|
}
|
|
3508
3525
|
if (this.allowFiltering && !this.enableVirtualization && this.getModuleName() !== 'autocomplete') {
|
|
3509
3526
|
let value = this.getItemData().value;
|
|
3510
|
-
let filterIndex = this.getIndexByValueFilter(value);
|
|
3527
|
+
let filterIndex = this.getIndexByValueFilter(value, this.actionCompleteData.ulElement);
|
|
3511
3528
|
if (!isNullOrUndefined(filterIndex)) {
|
|
3512
3529
|
this.activeIndex = filterIndex;
|
|
3513
3530
|
}
|
|
@@ -3849,7 +3866,7 @@ let DropDownList = class DropDownList extends DropDownBase {
|
|
|
3849
3866
|
value = 'null';
|
|
3850
3867
|
}
|
|
3851
3868
|
if (this.allowFiltering && !this.enableVirtualization && this.getModuleName() !== 'autocomplete') {
|
|
3852
|
-
let filterIndex = this.getIndexByValueFilter(value);
|
|
3869
|
+
let filterIndex = this.getIndexByValueFilter(value, this.actionCompleteData.ulElement);
|
|
3853
3870
|
if (!isNullOrUndefined(filterIndex)) {
|
|
3854
3871
|
this.activeIndex = filterIndex;
|
|
3855
3872
|
}
|
|
@@ -3891,7 +3908,7 @@ let DropDownList = class DropDownList extends DropDownBase {
|
|
|
3891
3908
|
this.inputElement.style.display = 'block';
|
|
3892
3909
|
}
|
|
3893
3910
|
if (!isNullOrUndefined(dataItem.value) && !this.enableVirtualization && this.allowFiltering) {
|
|
3894
|
-
this.activeIndex = this.getIndexByValueFilter(dataItem.value);
|
|
3911
|
+
this.activeIndex = this.getIndexByValueFilter(dataItem.value, this.actionCompleteData.ulElement);
|
|
3895
3912
|
}
|
|
3896
3913
|
const clearIcon = dropDownListClasses.clearIcon;
|
|
3897
3914
|
const isFilterElement = this.isFiltering() && this.filterInput && (this.getModuleName() === 'combobox');
|
|
@@ -5339,6 +5356,14 @@ let DropDownList = class DropDownList extends DropDownBase {
|
|
|
5339
5356
|
this.keyboardEvent = null;
|
|
5340
5357
|
EventHandler.remove(document, 'mousedown', this.onDocumentClick);
|
|
5341
5358
|
this.isActive = false;
|
|
5359
|
+
if (this.getModuleName() === 'dropdownlist') {
|
|
5360
|
+
Input.destroy({
|
|
5361
|
+
element: this.filterInput,
|
|
5362
|
+
floatLabelType: this.floatLabelType,
|
|
5363
|
+
properties: { placeholder: this.filterBarPlaceholder },
|
|
5364
|
+
buttons: this.clearIconElement,
|
|
5365
|
+
}, this.clearIconElement);
|
|
5366
|
+
}
|
|
5342
5367
|
this.filterInputObj = null;
|
|
5343
5368
|
this.isDropDownClick = false;
|
|
5344
5369
|
this.preventAutoFill = false;
|
|
@@ -5369,6 +5394,11 @@ let DropDownList = class DropDownList extends DropDownBase {
|
|
|
5369
5394
|
}
|
|
5370
5395
|
if (this.allowFiltering && this.getModuleName() === 'dropdownlist') {
|
|
5371
5396
|
this.filterInput.removeAttribute('aria-activedescendant');
|
|
5397
|
+
this.filterInput.removeAttribute('aria-disabled');
|
|
5398
|
+
this.filterInput.removeAttribute('role');
|
|
5399
|
+
this.filterInput.removeAttribute('autocomplete');
|
|
5400
|
+
this.filterInput.removeAttribute('autocapitalize');
|
|
5401
|
+
this.filterInput.removeAttribute('spellcheck');
|
|
5372
5402
|
}
|
|
5373
5403
|
this.filterInput = null;
|
|
5374
5404
|
}
|
|
@@ -5795,8 +5825,8 @@ let DropDownList = class DropDownList extends DropDownBase {
|
|
|
5795
5825
|
*/
|
|
5796
5826
|
onPropertyChanged(newProp, oldProp) {
|
|
5797
5827
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
5798
|
-
if (!isNullOrUndefined(newProp.dataSource) && !this.isTouched && (isNullOrUndefined(newProp.value) && isNullOrUndefined(newProp.index)) && !isNullOrUndefined(this.preselectedIndex)) {
|
|
5799
|
-
newProp.index = this.
|
|
5828
|
+
if (!isNullOrUndefined(newProp.dataSource) && !this.isTouched && (isNullOrUndefined(newProp.value) && isNullOrUndefined(newProp.index)) && !isNullOrUndefined(this.preselectedIndex) && !isNullOrUndefined(this.index)) {
|
|
5829
|
+
newProp.index = this.index;
|
|
5800
5830
|
}
|
|
5801
5831
|
if (!isNullOrUndefined(newProp.value) || !isNullOrUndefined(newProp.index)) {
|
|
5802
5832
|
this.isTouched = true;
|
|
@@ -6309,10 +6339,12 @@ let DropDownList = class DropDownList extends DropDownBase {
|
|
|
6309
6339
|
this.inputWrapper.container.parentElement.insertBefore(this.element, this.inputWrapper.container);
|
|
6310
6340
|
detach(this.inputWrapper.container);
|
|
6311
6341
|
}
|
|
6312
|
-
this.hiddenElement
|
|
6342
|
+
delete this.hiddenElement;
|
|
6313
6343
|
this.filterInput = null;
|
|
6314
|
-
this.inputWrapper = null;
|
|
6315
6344
|
this.keyboardModule = null;
|
|
6345
|
+
if (!isNullOrUndefined(this.ulElement)) {
|
|
6346
|
+
this.removeAllChildren(this.ulElement);
|
|
6347
|
+
}
|
|
6316
6348
|
this.ulElement = null;
|
|
6317
6349
|
this.list = null;
|
|
6318
6350
|
this.clearIconElement = null;
|
|
@@ -6336,10 +6368,12 @@ let DropDownList = class DropDownList extends DropDownBase {
|
|
|
6336
6368
|
Input.destroy({
|
|
6337
6369
|
element: this.inputElement,
|
|
6338
6370
|
floatLabelType: this.floatLabelType,
|
|
6339
|
-
properties: this.properties
|
|
6371
|
+
properties: this.properties,
|
|
6372
|
+
buttons: this.inputWrapper.container.querySelectorAll('.e-input-group-icon')[0],
|
|
6340
6373
|
}, this.clearButton);
|
|
6341
6374
|
this.clearButton = null;
|
|
6342
6375
|
this.inputElement = null;
|
|
6376
|
+
this.inputWrapper = null;
|
|
6343
6377
|
super.destroy();
|
|
6344
6378
|
}
|
|
6345
6379
|
/* eslint-disable valid-jsdoc, jsdoc/require-returns-description */
|
|
@@ -8394,6 +8428,8 @@ let DropDownTree = class DropDownTree extends Component {
|
|
|
8394
8428
|
if (this.showCheckBox) {
|
|
8395
8429
|
return;
|
|
8396
8430
|
}
|
|
8431
|
+
const eventArgs = this.getEventArgs(args);
|
|
8432
|
+
this.trigger('select', eventArgs);
|
|
8397
8433
|
let selectedText;
|
|
8398
8434
|
if (args.isInteracted) {
|
|
8399
8435
|
const id = getValue('id', args.nodeData).toString();
|
|
@@ -8421,8 +8457,6 @@ let DropDownTree = class DropDownTree extends Component {
|
|
|
8421
8457
|
this.setMultiSelect();
|
|
8422
8458
|
}
|
|
8423
8459
|
}
|
|
8424
|
-
const eventArgs = this.getEventArgs(args);
|
|
8425
|
-
this.trigger('select', eventArgs);
|
|
8426
8460
|
if (this.isValueChange && !this.changeOnBlur) {
|
|
8427
8461
|
this.triggerChangeEvent(this.keyEventArgs);
|
|
8428
8462
|
this.isValueChange = false;
|
|
@@ -11256,6 +11290,7 @@ function createFloatLabel(overAllWrapper, searchWrapper, element, inputElement,
|
|
|
11256
11290
|
element.id = id;
|
|
11257
11291
|
if (!isNullOrUndefined(element.id) && element.id !== '') {
|
|
11258
11292
|
floatLabelElement.id = 'label_' + element.id.replace(/ /g, '_');
|
|
11293
|
+
floatLabelElement.setAttribute('for', element.id);
|
|
11259
11294
|
attributes(inputElement, { 'aria-labelledby': floatLabelElement.id });
|
|
11260
11295
|
}
|
|
11261
11296
|
if (!isNullOrUndefined(inputElement.placeholder) && inputElement.placeholder !== '') {
|