@syncfusion/ej2-lists 20.2.38 → 20.2.45

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.
@@ -1693,7 +1693,6 @@ var ListView = /** @__PURE__ @class */ (function (_super) {
1693
1693
  }
1694
1694
  else {
1695
1695
  this.setSelectLI(li, e);
1696
- this.element.focus();
1697
1696
  }
1698
1697
  closestElement = closest(e.target, 'li');
1699
1698
  if (!isNullOrUndefined(closestElement)) {
@@ -2049,7 +2048,7 @@ var ListView = /** @__PURE__ @class */ (function (_super) {
2049
2048
  var eventArgs = {};
2050
2049
  merge(eventArgs, selectedItem);
2051
2050
  if (e) {
2052
- merge(eventArgs, { isInteracted: true, event: e, index: this.curUL && Array.prototype.indexOf.call(this.curUL.children, li) });
2051
+ merge(eventArgs, { isInteracted: true, event: e, cancel: false, index: this.curUL && Array.prototype.indexOf.call(this.curUL.children, li) });
2053
2052
  }
2054
2053
  return eventArgs;
2055
2054
  };
@@ -2076,6 +2075,7 @@ var ListView = /** @__PURE__ @class */ (function (_super) {
2076
2075
  }
2077
2076
  };
2078
2077
  ListView.prototype.setSelectLI = function (li, e) {
2078
+ var _this = this;
2079
2079
  if (this.isValidLI(li) && !li.classList.contains(classNames.selected) && this.enable) {
2080
2080
  if (!this.showCheckBox) {
2081
2081
  this.removeSelect();
@@ -2088,9 +2088,12 @@ var ListView = /** @__PURE__ @class */ (function (_super) {
2088
2088
  this.virtualizationModule.setSelectLI(li, e);
2089
2089
  }
2090
2090
  var eventArgs = this.selectEventData(li, e);
2091
- this.trigger('select', eventArgs);
2092
- this.selectedLI = li;
2093
- this.renderSubList(li);
2091
+ this.trigger('select', eventArgs, function (observedArgs) {
2092
+ if (!observedArgs.cancel) {
2093
+ _this.selectedLI = li;
2094
+ _this.renderSubList(li);
2095
+ }
2096
+ });
2094
2097
  }
2095
2098
  };
2096
2099
  ListView.prototype.setHoverLI = function (li) {