@syncfusion/ej2-dropdowns 20.2.45 → 20.2.46

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 : 20.2.45
3
+ * version : 20.2.46
4
4
  * Copyright Syncfusion Inc. 2001 - 2020. 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,8 +1,8 @@
1
1
  {
2
2
  "_from": "@syncfusion/ej2-dropdowns@*",
3
- "_id": "@syncfusion/ej2-dropdowns@20.2.44",
3
+ "_id": "@syncfusion/ej2-dropdowns@20.2.45",
4
4
  "_inBundle": false,
5
- "_integrity": "sha512-9vBBwKyg05ryfJg3bUB7aH40XTZxWrD/MIeososkx/tyMhpabbE6pl0UkqMJ/CL/jQD79YL/IIZkTNf0QSnqLw==",
5
+ "_integrity": "sha512-tyYDvpdpEBKIZ02cpy56kIbgdQU28VHlbHg4/ekSFb1PeevRc+KsXw31emLy9V182vAz6HpUSz8cb5oPL+Vm2A==",
6
6
  "_location": "/@syncfusion/ej2-dropdowns",
7
7
  "_phantomChildren": {},
8
8
  "_requested": {
@@ -33,8 +33,8 @@
33
33
  "/@syncfusion/ej2-spreadsheet",
34
34
  "/@syncfusion/ej2-vue-dropdowns"
35
35
  ],
36
- "_resolved": "http://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-dropdowns/-/ej2-dropdowns-20.2.44.tgz",
37
- "_shasum": "9f2bd56c148399001eb94aa89a169c1d08b544eb",
36
+ "_resolved": "http://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-dropdowns/-/ej2-dropdowns-20.2.45.tgz",
37
+ "_shasum": "3aa842e2fd4fd447d1b9032528bcb51ea9ef71dc",
38
38
  "_spec": "@syncfusion/ej2-dropdowns@*",
39
39
  "_where": "/jenkins/workspace/automation_release_19.1.0.1-ZPMUBNQ6AUYH6YGEFBPVYMEQLRRW2SLD4XCZ6GATNZJFYJ3RIAOA/packages/included",
40
40
  "author": {
@@ -42,11 +42,11 @@
42
42
  },
43
43
  "bundleDependencies": false,
44
44
  "dependencies": {
45
- "@syncfusion/ej2-base": "~20.2.45",
45
+ "@syncfusion/ej2-base": "~20.2.46",
46
46
  "@syncfusion/ej2-data": "~20.2.45",
47
47
  "@syncfusion/ej2-inputs": "~20.2.45",
48
- "@syncfusion/ej2-lists": "~20.2.45",
49
- "@syncfusion/ej2-navigations": "~20.2.45",
48
+ "@syncfusion/ej2-lists": "~20.2.46",
49
+ "@syncfusion/ej2-navigations": "~20.2.46",
50
50
  "@syncfusion/ej2-popups": "~20.2.45"
51
51
  },
52
52
  "deprecated": false,
@@ -72,6 +72,6 @@
72
72
  "module": "./index.js",
73
73
  "name": "@syncfusion/ej2-dropdowns",
74
74
  "typings": "index.d.ts",
75
- "version": "20.2.45",
75
+ "version": "20.2.46",
76
76
  "sideEffects": false
77
77
  }
@@ -213,6 +213,7 @@ export declare class DropDownBase extends Component<HTMLElement> implements INot
213
213
  protected isAngular: boolean;
214
214
  protected isPreventChange: boolean;
215
215
  protected isDynamicDataChange: boolean;
216
+ protected addedNewItem: boolean;
216
217
  /**
217
218
  * The `fields` property maps the columns of the data table and binds the data to the component.
218
219
  * * text - Maps the text column from data table for each list item.
@@ -86,6 +86,7 @@ var DropDownBase = /** @class */ (function (_super) {
86
86
  _this.isAngular = false;
87
87
  _this.isPreventChange = false;
88
88
  _this.isDynamicDataChange = false;
89
+ _this.addedNewItem = false;
89
90
  return _this;
90
91
  }
91
92
  DropDownBase.prototype.getPropObject = function (prop, newProp, oldProp) {
@@ -888,7 +889,8 @@ var DropDownBase = /** @class */ (function (_super) {
888
889
  dataSource = this.selectData;
889
890
  }
890
891
  }
891
- dataSource = this.getModuleName() === 'combobox' && this.selectData && dataSource instanceof Array && dataSource.length < this.selectData.length ? this.selectData : dataSource;
892
+ dataSource = this.getModuleName() === 'combobox' && this.selectData && dataSource instanceof Array && dataSource.length < this.selectData.length && this.addedNewItem ? this.selectData : dataSource;
893
+ this.addedNewItem = false;
892
894
  this.setListData(dataSource, fields, query, e);
893
895
  }
894
896
  };
@@ -1146,6 +1148,7 @@ var DropDownBase = /** @class */ (function (_super) {
1146
1148
  if (selectedItemValue || itemIndex === 0) {
1147
1149
  this.updateSelection();
1148
1150
  }
1151
+ this.addedNewItem = true;
1149
1152
  };
1150
1153
  DropDownBase.prototype.validationAttribute = function (target, hidden) {
1151
1154
  var name = target.getAttribute('name') ? target.getAttribute('name') : target.getAttribute('id');
@@ -2132,6 +2132,11 @@ var DropDownList = /** @class */ (function (_super) {
2132
2132
  if (this.element.hasAttribute('data-val')) {
2133
2133
  this.element.setAttribute('data-val', 'false');
2134
2134
  }
2135
+ var floatLabelElement = this.inputWrapper.container.getElementsByClassName('e-float-text')[0];
2136
+ if (!isNullOrUndefined(this.element.id) && this.element.id !== '' && !isNullOrUndefined(floatLabelElement)) {
2137
+ floatLabelElement.id = 'label_' + this.element.id.replace(/ /g, '_');
2138
+ attributes(this.inputElement, { 'aria-labelledby': floatLabelElement.id });
2139
+ }
2135
2140
  this.renderComplete();
2136
2141
  };
2137
2142
  DropDownList.prototype.setFooterTemplate = function (popupEle) {
@@ -3,7 +3,7 @@
3
3
  * Specifies whether to display the floating label above the input element.
4
4
  */
5
5
  import { removeClass, addClass, detach } from '@syncfusion/ej2-base';
6
- import { attributes, isNullOrUndefined, createElement } from '@syncfusion/ej2-base';
6
+ import { attributes, isNullOrUndefined, createElement, getUniqueID } from '@syncfusion/ej2-base';
7
7
  var FLOATLINE = 'e-float-line';
8
8
  var FLOATTEXT = 'e-float-text';
9
9
  var LABELTOP = 'e-label-top';
@@ -23,9 +23,11 @@ var LABELBOTTOM = 'e-label-bottom';
23
23
  export function createFloatLabel(overAllWrapper, searchWrapper, element, inputElement, value, floatLabelType, placeholder) {
24
24
  var floatLinelement = createElement('span', { className: FLOATLINE });
25
25
  var floatLabelElement = createElement('label', { className: FLOATTEXT });
26
+ var id = element.getAttribute('id') ? element.getAttribute('id') : getUniqueID('ej2_multiselect');
27
+ element.id = id;
26
28
  if (!isNullOrUndefined(element.id) && element.id !== '') {
27
29
  floatLabelElement.id = 'label_' + element.id.replace(/ /g, '_');
28
- attributes(element, { 'aria-labelledby': floatLabelElement.id });
30
+ attributes(inputElement, { 'aria-labelledby': floatLabelElement.id });
29
31
  }
30
32
  if (!isNullOrUndefined(inputElement.placeholder) && inputElement.placeholder !== '') {
31
33
  floatLabelElement.innerText = encodePlaceholder(inputElement.placeholder);