@syncfusion/ej2-dropdowns 35.1.37 → 35.1.41

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.
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * filename: index.d.ts
3
- * version : 35.1.37
3
+ * version : 35.1.41
4
4
  * Copyright Syncfusion Inc. 2001 - 2025. All rights reserved.
5
5
  * Use of this code is subject to the terms of our license.
6
6
  * A copy of the current license can be obtained at any time by e-mailing
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@syncfusion/ej2-dropdowns",
3
- "version": "35.1.37",
3
+ "version": "35.1.41",
4
4
  "description": "Essential JS 2 DropDown Components",
5
5
  "author": "Syncfusion Inc.",
6
6
  "license": "SEE LICENSE IN license",
@@ -10,11 +10,11 @@
10
10
  "dependencies": {
11
11
  "@syncfusion/ej2-base": "~35.1.37",
12
12
  "@syncfusion/ej2-data": "~35.1.37",
13
- "@syncfusion/ej2-inputs": "~35.1.37",
13
+ "@syncfusion/ej2-inputs": "~35.1.41",
14
14
  "@syncfusion/ej2-lists": "~35.1.37",
15
- "@syncfusion/ej2-navigations": "~35.1.37",
15
+ "@syncfusion/ej2-navigations": "~35.1.40",
16
16
  "@syncfusion/ej2-notifications": "~35.1.37",
17
- "@syncfusion/ej2-popups": "~35.1.37"
17
+ "@syncfusion/ej2-popups": "~35.1.39"
18
18
  },
19
19
  "devDependencies": {},
20
20
  "keywords": [
@@ -113,6 +113,9 @@ export declare class DropDownList extends DropDownBase implements IInput {
113
113
  };
114
114
  protected isCustomFilter: boolean;
115
115
  private isSecondClick;
116
+ private filterGeneration;
117
+ private pendingFilterRequests;
118
+ private isStaleFilter;
116
119
  protected isListSearched: boolean;
117
120
  protected preventChange: boolean;
118
121
  protected selectedElementID: string;
@@ -86,6 +86,9 @@ var DropDownList = /** @class */ (function (_super) {
86
86
  */
87
87
  function DropDownList(options, element) {
88
88
  var _this = _super.call(this, options, element) || this;
89
+ _this.filterGeneration = null;
90
+ _this.pendingFilterRequests = 0;
91
+ _this.isStaleFilter = false;
89
92
  _this.isListSearched = false;
90
93
  _this.preventChange = false;
91
94
  _this.isTouched = false;
@@ -138,6 +141,9 @@ var DropDownList = /** @class */ (function (_super) {
138
141
  this.preventAltUp = false;
139
142
  this.isCustomFilter = false;
140
143
  this.isSecondClick = false;
144
+ this.filterGeneration = null;
145
+ this.pendingFilterRequests = 0;
146
+ this.isStaleFilter = false;
141
147
  this.previousValue = null;
142
148
  this.keyConfigure = {
143
149
  tab: 'tab',
@@ -192,7 +198,7 @@ var DropDownList = /** @class */ (function (_super) {
192
198
  DropDownList.prototype.floatLabelChange = function () {
193
199
  if (this.getModuleName() === 'dropdownlist' && this.floatLabelType === 'Auto') {
194
200
  var floatElement = this.inputWrapper.container.querySelector('.e-float-text');
195
- if (floatElement && this.inputElement.value !== '' || this.isInteracted) {
201
+ if (floatElement && (this.inputElement.value !== '' || this.isInteracted)) {
196
202
  classList(floatElement, ['e-label-top'], ['e-label-bottom']);
197
203
  }
198
204
  else if (floatElement) {
@@ -1554,6 +1560,10 @@ var DropDownList = /** @class */ (function (_super) {
1554
1560
  li = null;
1555
1561
  };
1556
1562
  DropDownList.prototype.selectEventCallback = function (li, e, preventSelect, selectedData, value) {
1563
+ if (this.getModuleName() === 'dropdownlist' && this.allowFiltering &&
1564
+ this.dataSource instanceof DataManager && this.filterGeneration) {
1565
+ this.isStaleFilter = true;
1566
+ }
1557
1567
  this.previousItemData = (!isNullOrUndefined(this.itemData)) ? this.itemData : null;
1558
1568
  if (this.itemData !== selectedData) {
1559
1569
  this.previousValue = (!isNullOrUndefined(this.itemData)) ? typeof this.itemData == 'object' &&
@@ -1600,7 +1610,11 @@ var DropDownList = /** @class */ (function (_super) {
1600
1610
  DropDownList.prototype.setValue = function (e, autofill) {
1601
1611
  var dataItem = this.getItemData();
1602
1612
  this.isTouched = !isNullOrUndefined(e);
1603
- if (dataItem.value === null) {
1613
+ if (dataItem.value === null && !isNullOrUndefined(this.item) &&
1614
+ this.item.getAttribute('data-value') === 'null') {
1615
+ Input.setValue('null', this.inputElement, this.floatLabelType, this.showClearButton);
1616
+ }
1617
+ else if (dataItem.value === null) {
1604
1618
  Input.setValue(null, this.inputElement, this.floatLabelType, this.showClearButton);
1605
1619
  }
1606
1620
  else {
@@ -1645,6 +1659,10 @@ var DropDownList = /** @class */ (function (_super) {
1645
1659
  }
1646
1660
  };
1647
1661
  DropDownList.prototype.setSelection = function (li, e) {
1662
+ if (this.getModuleName() === 'dropdownlist' && this.allowFiltering && this.dataSource instanceof DataManager &&
1663
+ this.pendingFilterRequests > 0 && this.isValidLI(li)) {
1664
+ this.isStaleFilter = true;
1665
+ }
1648
1666
  if (this.isValidLI(li) && (!li.classList.contains(dropDownBaseClasses.selected) || (this.isPopupOpen && this.isSelected
1649
1667
  && li.classList.contains(dropDownBaseClasses.selected)))) {
1650
1668
  this.updateSelectedItem(li, e, false, true);
@@ -2217,7 +2235,21 @@ var DropDownList = /** @class */ (function (_super) {
2217
2235
  this.previousStartIndex = 0;
2218
2236
  this.virtualListInfo = null;
2219
2237
  }
2238
+ if (this.getModuleName() === 'dropdownlist' && this.allowFiltering && dataSource instanceof DataManager) {
2239
+ this.filterGeneration = {
2240
+ value: this.value
2241
+ };
2242
+ this.pendingFilterRequests++;
2243
+ }
2220
2244
  this.resetList(dataSource, fields, query);
2245
+ if (this.getModuleName() === 'dropdownlist' && this.allowFiltering &&
2246
+ dataSource instanceof DataManager && !this.isRequesting) {
2247
+ this.pendingFilterRequests--;
2248
+ if (this.pendingFilterRequests === 0) {
2249
+ this.filterGeneration = null;
2250
+ this.isStaleFilter = false;
2251
+ }
2252
+ }
2221
2253
  if (this.getModuleName() === 'dropdownlist' && this.list.classList.contains(dropDownBaseClasses.noData)) {
2222
2254
  this.popupContentElement.setAttribute('role', 'status');
2223
2255
  this.popupContentElement.setAttribute('id', 'no-record');
@@ -2345,6 +2377,14 @@ var DropDownList = /** @class */ (function (_super) {
2345
2377
  });
2346
2378
  };
2347
2379
  DropDownList.prototype.onActionFailure = function (e) {
2380
+ if (this.getModuleName() === 'dropdownlist' && this.allowFiltering && this.dataSource instanceof DataManager &&
2381
+ this.pendingFilterRequests > 0) {
2382
+ this.pendingFilterRequests--;
2383
+ if (this.pendingFilterRequests === 0) {
2384
+ this.filterGeneration = null;
2385
+ this.isStaleFilter = false;
2386
+ }
2387
+ }
2348
2388
  _super.prototype.onActionFailure.call(this, e);
2349
2389
  if (this.beforePopupOpen) {
2350
2390
  this.renderPopup();
@@ -2356,6 +2396,26 @@ var DropDownList = /** @class */ (function (_super) {
2356
2396
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
2357
2397
  DropDownList.prototype.onActionComplete = function (ulElement, list, e, isUpdated) {
2358
2398
  var _this = this;
2399
+ if (this.getModuleName() === 'dropdownlist' && this.allowFiltering && this.dataSource instanceof DataManager &&
2400
+ !isNullOrUndefined(e) && this.pendingFilterRequests > 0) {
2401
+ this.pendingFilterRequests--;
2402
+ if (this.filterGeneration && (this.isStaleFilter || this.filterGeneration.value !== this.value)) {
2403
+ if (this.actionCompleteData.ulElement && this.actionCompleteData.list) {
2404
+ ulElement = this.actionCompleteData.ulElement.cloneNode(true);
2405
+ list = this.actionCompleteData.list;
2406
+ e = null;
2407
+ this.typedString = '';
2408
+ this.isTyped = false;
2409
+ if (this.filterInput) {
2410
+ this.filterInput.value = '';
2411
+ }
2412
+ }
2413
+ }
2414
+ if (this.pendingFilterRequests === 0) {
2415
+ this.filterGeneration = null;
2416
+ this.isStaleFilter = false;
2417
+ }
2418
+ }
2359
2419
  if (this.dataSource instanceof DataManager && !isNullOrUndefined(e) && !this.virtualGroupDataSource) {
2360
2420
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
2361
2421
  this.totalItemCount = e.count;
@@ -2623,7 +2683,16 @@ var DropDownList = /** @class */ (function (_super) {
2623
2683
  return (((typeof data === 'string' || typeof data === 'number' || typeof data === 'boolean') && data === value_1) ||
2624
2684
  (getValue(_this.fields.value, data) === value_1));
2625
2685
  });
2626
- if (!isExist) {
2686
+ var isRemoteFilteredDropDownList = this.getModuleName() === 'dropdownlist' && this.allowFiltering &&
2687
+ this.dataSource instanceof DataManager;
2688
+ var isExistInCachedList = Boolean(isRemoteFilteredDropDownList && this.actionCompleteData.list &&
2689
+ this.actionCompleteData.list.some(function (data) {
2690
+ return (((typeof data === 'string' || typeof data === 'number' || typeof data === 'boolean') && data === value_1) ||
2691
+ (getValue(_this.fields.value, data) === value_1));
2692
+ }));
2693
+ var isExistInCachedElement = Boolean(isRemoteFilteredDropDownList && this.actionCompleteData.ulElement &&
2694
+ Array.prototype.some.call(this.actionCompleteData.ulElement.querySelectorAll('li[data-value]'), function (item) { return item.getAttribute('data-value') === String(value_1); }));
2695
+ if (!isExist && (!isRemoteFilteredDropDownList || (!isExistInCachedList && !isExistInCachedElement))) {
2627
2696
  this.addItem(this.itemData);
2628
2697
  }
2629
2698
  }
@@ -3984,6 +4053,47 @@ var DropDownList = /** @class */ (function (_super) {
3984
4053
  break;
3985
4054
  case 'placeholder':
3986
4055
  Input.setPlaceholder(newProp.placeholder, this_1.inputElement);
4056
+ if (this_1.getModuleName() === 'dropdownlist') {
4057
+ if (!newProp.placeholder || newProp.placeholder.trim() === '') {
4058
+ var label = this_1.inputWrapper.container.querySelector('.e-float-text');
4059
+ if (label) {
4060
+ label.remove();
4061
+ }
4062
+ this_1.inputElement.removeAttribute('aria-labelledby');
4063
+ }
4064
+ else if (this_1.floatLabelType !== 'Never' && !this_1.value) {
4065
+ var floatLabel = this_1.inputWrapper.container
4066
+ .querySelector('.e-float-text');
4067
+ if (!floatLabel) {
4068
+ floatLabel = this_1.createElement('label');
4069
+ floatLabel.classList.add('e-float-text');
4070
+ if (this_1.floatLabelType === 'Auto') {
4071
+ floatLabel.classList.add('e-label-bottom');
4072
+ }
4073
+ else if (this_1.floatLabelType === 'Always') {
4074
+ floatLabel.classList.add('e-label-top');
4075
+ }
4076
+ floatLabel.id = 'label_' + this_1.inputElement.id;
4077
+ floatLabel.setAttribute('for', this_1.inputElement.id);
4078
+ var floatLine = this_1.inputWrapper.container
4079
+ .querySelector('.e-float-line');
4080
+ var icon = this_1.inputWrapper.container
4081
+ .querySelector('.e-input-group-icon');
4082
+ if (floatLine) {
4083
+ floatLine.insertAdjacentElement('afterend', floatLabel);
4084
+ }
4085
+ else if (icon) {
4086
+ this_1.inputWrapper.container.insertBefore(floatLabel, icon);
4087
+ }
4088
+ else {
4089
+ this_1.inputWrapper.container.appendChild(floatLabel);
4090
+ }
4091
+ }
4092
+ floatLabel.style.width = this_1.inputElement.offsetWidth + 'px';
4093
+ floatLabel.textContent = newProp.placeholder;
4094
+ this_1.inputElement.setAttribute('aria-labelledby', floatLabel.id);
4095
+ }
4096
+ }
3987
4097
  break;
3988
4098
  case 'filterBarPlaceholder':
3989
4099
  if (this_1.filterInput) {
@@ -4308,6 +4418,10 @@ var DropDownList = /** @class */ (function (_super) {
4308
4418
  label.style.width = calculateWidth + 'px';
4309
4419
  }
4310
4420
  }
4421
+ if (label && this.getModuleName() === 'dropdownlist' && (!this.placeholder || this.placeholder.trim() === '')) {
4422
+ label.remove();
4423
+ this.inputElement.removeAttribute('aria-labelledby');
4424
+ }
4311
4425
  };
4312
4426
  /**
4313
4427
  * Return the module name of this component.
@@ -4572,6 +4686,9 @@ var DropDownList = /** @class */ (function (_super) {
4572
4686
  */
4573
4687
  DropDownList.prototype.destroy = function () {
4574
4688
  this.isActive = false;
4689
+ this.isStaleFilter = false;
4690
+ this.filterGeneration = null;
4691
+ this.pendingFilterRequests = 0;
4575
4692
  if (this.showClearButton) {
4576
4693
  this.clearButton = document.getElementsByClassName('e-clear-icon')[0];
4577
4694
  }
@@ -345,6 +345,7 @@ export declare class DropDownTree extends Component<HTMLElement> implements INot
345
345
  private previousFilterText;
346
346
  private fallbackValue;
347
347
  private uncheckedNodeId;
348
+ private isTotalCountClicked;
348
349
  /**
349
350
  * Specifies the template that renders to the popup list content of the
350
351
  * Dropdown Tree component when the data fetch request from the remote server fails.
@@ -849,6 +850,7 @@ export declare class DropDownTree extends Component<HTMLElement> implements INot
849
850
  private renderTree;
850
851
  private updateIndeterminateNodes;
851
852
  private renderPopup;
853
+ protected getAppendToElement(): HTMLElement;
852
854
  private checkCollision;
853
855
  private removeFocus;
854
856
  private updateFocus;
@@ -179,6 +179,7 @@ var DropDownTree = /** @class */ (function (_super) {
179
179
  _this.isFromFilterChange = false;
180
180
  _this.fallbackValue = [];
181
181
  _this.uncheckedNodeId = null;
182
+ _this.isTotalCountClicked = false;
182
183
  return _this;
183
184
  }
184
185
  /**
@@ -319,7 +320,7 @@ var DropDownTree = /** @class */ (function (_super) {
319
320
  this.tree = this.createElement('div', { id: this.element.id + '_tree' });
320
321
  this.popupDiv.appendChild(this.tree);
321
322
  if (!this.destroyPopupOnHide) {
322
- document.body.appendChild(this.popupDiv);
323
+ this.getAppendToElement().appendChild(this.popupDiv);
323
324
  }
324
325
  this.wireTreeEvents();
325
326
  addClass([this.popupDiv], DDTHIDEICON);
@@ -409,6 +410,11 @@ var DropDownTree = /** @class */ (function (_super) {
409
410
  _this.hidePopup();
410
411
  }
411
412
  break;
413
+ case 'tab':
414
+ if (_this.isPopupOpen && !isNOU(_this.popupDiv) && _this.popupDiv.classList.contains('e-no-data')) {
415
+ _this.hidePopup();
416
+ }
417
+ break;
412
418
  case 'shiftTab':
413
419
  addClass([_this.inputWrapper], [INPUTFOCUS]);
414
420
  break;
@@ -1829,7 +1835,7 @@ var DropDownTree = /** @class */ (function (_super) {
1829
1835
  });
1830
1836
  _this.popupEle.setAttribute('role', 'region');
1831
1837
  _this.popupEle.setAttribute('aria-label', _this.element.id);
1832
- document.body.appendChild(_this.popupEle);
1838
+ _this.getAppendToElement().appendChild(_this.popupEle);
1833
1839
  _this.createPopup(_this.popupEle);
1834
1840
  }
1835
1841
  else {
@@ -1922,6 +1928,16 @@ var DropDownTree = /** @class */ (function (_super) {
1922
1928
  }
1923
1929
  });
1924
1930
  };
1931
+ DropDownTree.prototype.getAppendToElement = function () {
1932
+ if (this.isAngular) {
1933
+ var cdkPane = this.element && this.element.closest ? this.element.closest('.cdk-overlay-pane') : null;
1934
+ var popoverEl = this.element && this.element.closest ? this.element.closest('[popover]') : null;
1935
+ if (cdkPane && popoverEl) {
1936
+ return cdkPane;
1937
+ }
1938
+ }
1939
+ return document.body;
1940
+ };
1925
1941
  DropDownTree.prototype.checkCollision = function (popupEle) {
1926
1942
  var collision = isCollide(popupEle);
1927
1943
  if (collision.length > 0) {
@@ -2045,6 +2061,12 @@ var DropDownTree = /** @class */ (function (_super) {
2045
2061
  var isScroller = target.classList.contains(DROPDOWN) ? true :
2046
2062
  (matches(target, '.e-ddt .e-popup') || matches(target, '.e-ddt .e-treeview'));
2047
2063
  var isSelectAllArea = target.classList.contains('e-ripple-container');
2064
+ if (this.overFlowWrapper && !this.overFlowWrapper.classList.contains(HIDEICON) && !this.isPopupOpen) {
2065
+ this.isTotalCountClicked = true;
2066
+ }
2067
+ else {
2068
+ this.isTotalCountClicked = false;
2069
+ }
2048
2070
  if ((this.isPopupOpen && ((!isNOU(this.inputWrapper) &&
2049
2071
  this.inputWrapper.contains(target)) || isTree || isScroller || isHeader || isFooter || isSelectAllArea)) ||
2050
2072
  ((this.allowMultiSelection || this.showCheckBox) && (this.isPopupOpen && target.classList.contains(CHIP_CLOSE) ||
@@ -3092,7 +3114,8 @@ var DropDownTree = /** @class */ (function (_super) {
3092
3114
  }
3093
3115
  };
3094
3116
  DropDownTree.prototype.removeChip = function (e) {
3095
- if (!this.enabled || this.readonly) {
3117
+ if (!this.enabled || this.readonly || this.isTotalCountClicked) {
3118
+ this.isTotalCountClicked = false;
3096
3119
  return;
3097
3120
  }
3098
3121
  if (e.target.classList.contains('e-chips-close') && !this.isPopupOpen) {
@@ -192,7 +192,9 @@ var ListBox = /** @class */ (function (_super) {
192
192
  this.selectAllText = l10nSelect.getConstant('selectAllText');
193
193
  this.unSelectAllText = l10nSelect.getConstant('unSelectAllText');
194
194
  this.popupWrapper = this.list;
195
- this.checkBoxSelectionModule.checkAllParent = null;
195
+ if (this.checkBoxSelectionModule) {
196
+ this.checkBoxSelectionModule.checkAllParent = null;
197
+ }
196
198
  if (this.filterParent) {
197
199
  var parentNode = this.filterParent.parentNode;
198
200
  if (parentNode) {
@@ -2425,7 +2427,9 @@ var ListBox = /** @class */ (function (_super) {
2425
2427
  this.selectAllText = l10nShow.getConstant('selectAllText');
2426
2428
  this.unSelectAllText = l10nShow.getConstant('unSelectAllText');
2427
2429
  this.popupWrapper = this.list;
2428
- this.checkBoxSelectionModule.checkAllParent = null;
2430
+ if (this.checkBoxSelectionModule) {
2431
+ this.checkBoxSelectionModule.checkAllParent = null;
2432
+ }
2429
2433
  this.notify('selectAll', {});
2430
2434
  this.checkSelectAll();
2431
2435
  }
@@ -2436,7 +2440,10 @@ var ListBox = /** @class */ (function (_super) {
2436
2440
  }
2437
2441
  for (index; index < liCollLen; index++) {
2438
2442
  if (liColl[index].classList.contains('e-list-item')) {
2439
- liColl[index].removeChild(liColl[index].getElementsByClassName('e-checkbox-wrapper')[0]);
2443
+ var checkboxElem = liColl[index].getElementsByClassName('e-checkbox-wrapper')[0];
2444
+ if (checkboxElem) {
2445
+ liColl[index].removeChild(checkboxElem);
2446
+ }
2440
2447
  }
2441
2448
  if (liColl[index].hasAttribute('aria-selected')) {
2442
2449
  liColl[index].removeAttribute('aria-selected');
@@ -2625,7 +2632,13 @@ var ListBox = /** @class */ (function (_super) {
2625
2632
  this.showSelectAll = showSelectAll;
2626
2633
  if (this.showSelectAll) {
2627
2634
  var l10nSel = new L10n(this.getModuleName(), { selectAllText: 'Select All', unSelectAllText: 'Unselect All' }, this.locale);
2628
- this.checkBoxSelectionModule.checkAllParent = null;
2635
+ var selectAllElem = this.list.querySelector('.e-selectall-parent');
2636
+ if (this.checkBoxSelectionModule) {
2637
+ this.checkBoxSelectionModule.checkAllParent = null;
2638
+ }
2639
+ if (selectAllElem) {
2640
+ detach(selectAllElem);
2641
+ }
2629
2642
  this.showSelectAll = true;
2630
2643
  this.selectAllText = l10nSel.getConstant('selectAllText');
2631
2644
  this.unSelectAllText = l10nSel.getConstant('selectAllText');
@@ -175,12 +175,14 @@ var CheckBoxSelection = /** @class */ (function () {
175
175
  var target;
176
176
  if (!isNullOrUndefined(args.e)) {
177
177
  var frameElm = args.li.querySelector('.e-checkbox-wrapper .e-frame');
178
- target = !isNullOrUndefined(args.e.target) ?
179
- (args.e.target.classList.contains('e-frame')
180
- && (!this.parent.showSelectAll
181
- || (this.checkAllParent && !this.checkAllParent.contains(args.e.target)))) ?
182
- args.e.target : args.li.querySelector('.e-checkbox-wrapper').childNodes[1]
183
- : args.li.querySelector('.e-checkbox-wrapper').childNodes[1];
178
+ var checkboxWrapper = args.li.querySelector('.e-checkbox-wrapper');
179
+ target = !isNullOrUndefined(args.e.target)
180
+ ? (args.e.target.classList.contains('e-frame') &&
181
+ (!this.parent.showSelectAll ||
182
+ (this.checkAllParent && !this.checkAllParent.contains(args.e.target))))
183
+ ? args.e.target
184
+ : (checkboxWrapper ? checkboxWrapper.childNodes[1] : null)
185
+ : (checkboxWrapper ? checkboxWrapper.childNodes[1] : null);
184
186
  }
185
187
  else {
186
188
  var checkboxWrapper = args.li.querySelector('.e-checkbox-wrapper');
@@ -16,8 +16,9 @@ export declare function createFloatLabel(overAllWrapper: HTMLDivElement, searchW
16
16
  *
17
17
  * @param {string[] | number[] | boolean[]} value - Value of the MultiSelect.
18
18
  * @param {HTMLElement} label - Float label element.
19
+ * @param {FloatLabelType} floatlabeltype - specify the float label type.
19
20
  */
20
- export declare function updateFloatLabelState(value: string[] | number[] | boolean[] | object[], label: HTMLElement): void;
21
+ export declare function updateFloatLabelState(value: string[] | number[] | boolean[] | object[], label: HTMLElement, floatlabeltype?: FloatLabelType): void;
21
22
  /**
22
23
  * Function to remove Float Label element.
23
24
  *
@@ -44,7 +44,7 @@ export function createFloatLabel(overAllWrapper, searchWrapper, element, inputEl
44
44
  searchWrapper.appendChild(floatLinelement);
45
45
  searchWrapper.appendChild(floatLabelElement);
46
46
  overAllWrapper.classList.add('e-float-input');
47
- updateFloatLabelState(value, floatLabelElement);
47
+ updateFloatLabelState(value, floatLabelElement, floatLabelType);
48
48
  if (floatLabelType === 'Always') {
49
49
  if (floatLabelElement.classList.contains(LABELBOTTOM)) {
50
50
  removeClass([floatLabelElement], LABELBOTTOM);
@@ -57,9 +57,13 @@ export function createFloatLabel(overAllWrapper, searchWrapper, element, inputEl
57
57
  *
58
58
  * @param {string[] | number[] | boolean[]} value - Value of the MultiSelect.
59
59
  * @param {HTMLElement} label - Float label element.
60
+ * @param {FloatLabelType} floatlabeltype - specify the float label type.
60
61
  */
61
- export function updateFloatLabelState(value, label) {
62
- if (value && value.length > 0) {
62
+ export function updateFloatLabelState(value, label, floatlabeltype) {
63
+ var floatElement = label.closest('.e-float-input');
64
+ var isFocused = floatElement &&
65
+ floatElement.classList.contains('e-input-focus');
66
+ if ((value && value.length > 0) || (isFocused && floatElement.closest('.e-multiselect') && floatlabeltype === 'Auto')) {
63
67
  addClass([label], LABELTOP);
64
68
  removeClass([label], LABELBOTTOM);
65
69
  }
@@ -851,7 +851,6 @@ export declare class MultiSelect extends DropDownBase implements IInput {
851
851
  protected preRender(): void;
852
852
  protected getLocaleName(): string;
853
853
  private initializeData;
854
- private sanitizeData;
855
854
  private updateData;
856
855
  private initialTextUpdate;
857
856
  protected renderList(isEmptyData?: boolean): void;