@syncfusion/ej2-dropdowns 31.1.22 → 31.2.2

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.
@@ -1461,9 +1461,9 @@ let DropDownBase = class DropDownBase extends Component {
1461
1461
  getJSONfromOption(items, options, fields, category = null) {
1462
1462
  for (const option of options) {
1463
1463
  const json = {};
1464
- json[fields.text] = option.innerHTML;
1464
+ json[fields.text] = option.text;
1465
1465
  json[fields.value] = !isNullOrUndefined(option.getAttribute(fields.value)) ?
1466
- option.getAttribute(fields.value) : option.innerHTML;
1466
+ option.getAttribute(fields.value) : option.value;
1467
1467
  if (!isNullOrUndefined(category)) {
1468
1468
  json[fields.groupBy] = category;
1469
1469
  }
@@ -1982,7 +1982,7 @@ let DropDownBase = class DropDownBase extends Component {
1982
1982
  const data = this.sortOrder !== 'None' ? !isNullOrUndefined(this.fields.groupBy) ?
1983
1983
  this.sortedData.filter((item) => !('isHeader' in item) || item.isHeader !== true) : this.sortedData : this.listData;
1984
1984
  for (let index = 0; index < liCollections.length; index++) {
1985
- if (JSON.parse(JSON.stringify(data[index]))[this.fields.disabled]) {
1985
+ if (data[index] && JSON.parse(JSON.stringify(data[index]))[this.fields.disabled]) {
1986
1986
  if (!isNullOrUndefined(this.fields.groupBy)) {
1987
1987
  const item = data[index];
1988
1988
  const value = getValue((this.fields.value ? this.fields.value : 'value'), item);
@@ -5094,7 +5094,7 @@ let DropDownList = class DropDownList extends DropDownBase {
5094
5094
  this.isRequesting = false;
5095
5095
  const eventArgs = {
5096
5096
  preventDefaultAction: false,
5097
- text: this.filterInput.value,
5097
+ text: this.filterInput ? this.filterInput.value : '',
5098
5098
  updateData: (dataSource, query, fields) => {
5099
5099
  if (eventArgs.cancel) {
5100
5100
  return;
@@ -20713,7 +20713,7 @@ let ListBox = ListBox_1 = class ListBox extends DropDownBase {
20713
20713
  const targetListObj = this.getComponent(args.target);
20714
20714
  if (targetListObj && targetListObj.listData.length === 0) {
20715
20715
  const noRecElem = targetListObj.ulElement.childNodes[0];
20716
- if (noRecElem) {
20716
+ if (noRecElem && targetListObj.allowDragAndDrop) {
20717
20717
  targetListObj.ulElement.removeChild(noRecElem);
20718
20718
  }
20719
20719
  }