@syncfusion/ej2-dropdowns 19.3.48 → 19.3.53

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.
@@ -4235,6 +4235,7 @@ let DropDownTree = class DropDownTree extends Component {
4235
4235
  // eslint-disable-next-line
4236
4236
  this.selectedData = [];
4237
4237
  this.filterDelayTime = 300;
4238
+ this.isClicked = false;
4238
4239
  }
4239
4240
  /**
4240
4241
  * Get the properties to be maintained in the persisted state.
@@ -5200,8 +5201,10 @@ let DropDownTree = class DropDownTree extends Component {
5200
5201
  }
5201
5202
  this.checkWrapper = closest(target, '.' + CHECKBOXWRAP);
5202
5203
  if (!isNullOrUndefined(this.checkWrapper)) {
5204
+ this.isClicked = true;
5203
5205
  const checkElement = select('.' + CHECKBOXFRAME, this.checkWrapper);
5204
5206
  this.changeState(this.checkWrapper, checkElement.classList.contains(CHECK) ? 'uncheck' : 'check', e);
5207
+ this.isClicked = false;
5205
5208
  }
5206
5209
  e.preventDefault();
5207
5210
  }
@@ -5896,7 +5899,7 @@ let DropDownTree = class DropDownTree extends Component {
5896
5899
  }
5897
5900
  const eventArgs = {
5898
5901
  action: this.showCheckBox ? state : args.action,
5899
- isInteracted: args.isInteracted,
5902
+ isInteracted: this.isClicked ? true : args.isInteracted,
5900
5903
  item: args.node,
5901
5904
  itemData: this.showCheckBox ? checkData[0] : selectData
5902
5905
  };
@@ -5967,6 +5970,7 @@ let DropDownTree = class DropDownTree extends Component {
5967
5970
  }
5968
5971
  const target = args.event.target;
5969
5972
  if ((target.classList.contains('e-fullrow') || target.classList.contains('e-list-text')) && this.showCheckBox) {
5973
+ this.isClicked = true;
5970
5974
  // eslint-disable-next-line
5971
5975
  const getNodeDetails = this.treeObj.getNode(args.node);
5972
5976
  if (getNodeDetails.isChecked === 'true') {
@@ -5975,6 +5979,7 @@ let DropDownTree = class DropDownTree extends Component {
5975
5979
  else {
5976
5980
  this.treeObj.checkAll([args.node]);
5977
5981
  }
5982
+ this.isClicked = false;
5978
5983
  this.setMultiSelect();
5979
5984
  this.ensurePlaceHolder();
5980
5985
  }
@@ -9362,6 +9367,18 @@ let MultiSelect = class MultiSelect extends DropDownBase {
9362
9367
  }
9363
9368
  this.inputFocus = false;
9364
9369
  this.overAllWrapper.classList.remove(FOCUS);
9370
+ if (this.addTagOnBlur) {
9371
+ const dataChecks = this.getValueByText(this.inputElement.value, this.ignoreCase, this.ignoreAccent);
9372
+ const listLiElement = this.findListElement(this.list, 'li', 'data-value', dataChecks);
9373
+ const className = this.hideSelectedItem ? HIDE_LIST : dropDownBaseClasses.selected;
9374
+ const allowChipAddition = (listLiElement && !listLiElement.classList.contains(className)) ? true : false;
9375
+ if (allowChipAddition) {
9376
+ this.updateListSelection(listLiElement, eve);
9377
+ if (this.mode === 'Delimiter') {
9378
+ this.updateDelimeter(this.delimiterChar);
9379
+ }
9380
+ }
9381
+ }
9365
9382
  this.refreshListItems(null);
9366
9383
  if (this.mode !== 'Box' && this.mode !== 'CheckBox') {
9367
9384
  this.updateDelimView();
@@ -12574,6 +12591,9 @@ __decorate$5([
12574
12591
  __decorate$5([
12575
12592
  Property(true)
12576
12593
  ], MultiSelect.prototype, "openOnClick", void 0);
12594
+ __decorate$5([
12595
+ Property(false)
12596
+ ], MultiSelect.prototype, "addTagOnBlur", void 0);
12577
12597
  __decorate$5([
12578
12598
  Event()
12579
12599
  ], MultiSelect.prototype, "change", void 0);
@@ -12764,7 +12784,7 @@ class CheckBoxSelection {
12764
12784
  }
12765
12785
  if (this.parent.list.classList.contains('e-nodata') || (this.parent.listData && this.parent.listData.length <= 1 &&
12766
12786
  !(this.parent.isDynamicDataChange)) || (this.parent.isDynamicDataChange &&
12767
- !isNullOrUndefined(this.parent.value) && this.parent.value.length <= 1)) {
12787
+ this.parent.listData && this.parent.listData.length <= 1)) {
12768
12788
  this.checkAllParent.style.display = 'none';
12769
12789
  }
12770
12790
  else {