@syncfusion/ej2-lists 32.1.24 → 32.2.3

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.
@@ -1277,6 +1277,7 @@ let ListView = class ListView extends Component {
1277
1277
  this.setCSSClass(oldProp.cssClass);
1278
1278
  break;
1279
1279
  case 'enable':
1280
+ case 'enabled':
1280
1281
  this.setEnable();
1281
1282
  break;
1282
1283
  case 'width':
@@ -1374,7 +1375,7 @@ let ListView = class ListView extends Component {
1374
1375
  this.isWindow = this.element.clientHeight ? false : true;
1375
1376
  }
1376
1377
  setEnable() {
1377
- this.enableElement(this.element, this.enable);
1378
+ this.enableElement(this.element, this.enabled && this.enable);
1378
1379
  }
1379
1380
  setEnableRTL() {
1380
1381
  if (this.enableRtl) {
@@ -1770,7 +1771,7 @@ let ListView = class ListView extends Component {
1770
1771
  li = target;
1771
1772
  }
1772
1773
  this.removeFocus();
1773
- if (this.enable && this.showCheckBox && this.isValidLI(li)) {
1774
+ if (this.isComponentEnabled && this.showCheckBox && this.isValidLI(li)) {
1774
1775
  if (e.target.classList.contains(classNames.checkboxIcon)) {
1775
1776
  li.classList.add(classNames.focused);
1776
1777
  if (isNullOrUndefined(li.querySelector('.' + classNames.checked))) {
@@ -1995,7 +1996,7 @@ let ListView = class ListView extends Component {
1995
1996
  }
1996
1997
  }
1997
1998
  spaceKeyHandler(e) {
1998
- if (this.enable && this.showCheckBox && Object.keys(this.dataSource).length && this.curUL) {
1999
+ if (this.isComponentEnabled && this.showCheckBox && Object.keys(this.dataSource).length && this.curUL) {
1999
2000
  e.preventDefault();
2000
2001
  const li = this.curUL.querySelector('.' + classNames.focused);
2001
2002
  let checkboxElement;
@@ -2134,7 +2135,7 @@ let ListView = class ListView extends Component {
2134
2135
  && !li.classList.contains(classNames.disable));
2135
2136
  }
2136
2137
  setCheckboxLI(li, e) {
2137
- if (this.isValidLI(li) && this.enable && this.showCheckBox) {
2138
+ if (this.isValidLI(li) && this.isComponentEnabled && this.showCheckBox) {
2138
2139
  if (this.curUL.querySelector('.' + classNames.focused)) {
2139
2140
  this.curUL.querySelector('.' + classNames.focused).classList.remove(classNames.focused);
2140
2141
  }
@@ -2217,7 +2218,7 @@ let ListView = class ListView extends Component {
2217
2218
  }
2218
2219
  }
2219
2220
  setSelectLI(li, e) {
2220
- if (this.isValidLI(li) && !li.classList.contains(classNames.selected) && this.enable) {
2221
+ if (this.isValidLI(li) && !li.classList.contains(classNames.selected) && this.isComponentEnabled) {
2221
2222
  if (!this.showCheckBox) {
2222
2223
  this.removeSelect();
2223
2224
  }
@@ -2241,7 +2242,7 @@ let ListView = class ListView extends Component {
2241
2242
  }
2242
2243
  }
2243
2244
  setHoverLI(li) {
2244
- if (this.isValidLI(li) && !li.classList.contains(classNames.hover) && this.enable) {
2245
+ if (this.isValidLI(li) && !li.classList.contains(classNames.hover) && this.isComponentEnabled) {
2245
2246
  const lastLi = this.element.querySelectorAll('.' + classNames.hover);
2246
2247
  if (lastLi && lastLi.length) {
2247
2248
  removeClass(lastLi, classNames.hover);
@@ -3144,9 +3145,12 @@ let ListView = class ListView extends Component {
3144
3145
  */
3145
3146
  getPersistData() {
3146
3147
  return this.addOnPersist(['cssClass', 'enableRtl', 'htmlAttributes',
3147
- 'enable', 'fields', 'animation', 'headerTitle',
3148
+ 'enable', 'enabled', 'fields', 'animation', 'headerTitle',
3148
3149
  'sortOrder', 'showIcon', 'height', 'width', 'showCheckBox', 'checkBoxPosition', 'selectedId']);
3149
3150
  }
3151
+ get isComponentEnabled() {
3152
+ return this.enabled && this.enable;
3153
+ }
3150
3154
  };
3151
3155
  __decorate([
3152
3156
  Property('')
@@ -3160,6 +3164,9 @@ __decorate([
3160
3164
  __decorate([
3161
3165
  Property(true)
3162
3166
  ], ListView.prototype, "enable", void 0);
3167
+ __decorate([
3168
+ Property(true)
3169
+ ], ListView.prototype, "enabled", void 0);
3163
3170
  __decorate([
3164
3171
  Property([])
3165
3172
  ], ListView.prototype, "dataSource", void 0);