@syncfusion/ej2-lists 24.2.3 → 24.2.8

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.
@@ -1487,7 +1487,7 @@ var ListView = /** @__PURE__ @class */ (function (_super) {
1487
1487
  if (args.item.classList.contains(classNames.hasChild)) {
1488
1488
  this.isNestedList = true;
1489
1489
  }
1490
- if (this.showCheckBox && this.isValidLI(args.item)) {
1490
+ if (this.showCheckBox && args.item.classList.contains(classNames.listItem)) {
1491
1491
  var checkboxElement = void 0;
1492
1492
  var fieldData_1;
1493
1493
  // eslint-disable-next-line prefer-const
@@ -2524,6 +2524,22 @@ var ListView = /** @__PURE__ @class */ (function (_super) {
2524
2524
  }
2525
2525
  }
2526
2526
  };
2527
+ /**
2528
+ * This method allows for deselecting a list item within the ListView. The item to be deselected can be specified by passing the element or field object.
2529
+ *
2530
+ * @param {Fields | HTMLElement | Element} item - We can pass an element Object or Fields as an Object with ID and Text fields.
2531
+ */
2532
+ ListView.prototype.unselectItem = function (item) {
2533
+ if (isNullOrUndefined(item)) {
2534
+ this.removeSelect();
2535
+ }
2536
+ else {
2537
+ var li = this.getLiFromObjOrElement(item);
2538
+ if (!isNullOrUndefined(li)) {
2539
+ this.removeSelect(li);
2540
+ }
2541
+ }
2542
+ };
2527
2543
  ListView.prototype.getLiFromObjOrElement = function (obj) {
2528
2544
  var li;
2529
2545
  var dataSource = this.dataSource instanceof DataManager ?