@dev-tcloud/tcloud-ui 0.0.68 → 0.0.69

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.
@@ -1209,10 +1209,10 @@ class TCloudUiDataListComponent {
1209
1209
  this.onChangeCallback = noop$5;
1210
1210
  }
1211
1211
  set disabled(v) {
1212
- if (v) {
1212
+ if (typeof v === 'boolean' && v !== this._disabled) {
1213
1213
  this._disabled = v;
1214
- this.selected_description = '';
1215
- this.selected_item = '';
1214
+ //this.selected_description = '';
1215
+ //this.selected_item ='';
1216
1216
  this.toChange();
1217
1217
  }
1218
1218
  }
@@ -1220,8 +1220,8 @@ class TCloudUiDataListComponent {
1220
1220
  set loading(v) {
1221
1221
  if (typeof v === 'boolean' && v !== this._loading) {
1222
1222
  this._loading = v;
1223
- this.selected_description = '';
1224
- this.selected_item = '';
1223
+ //this.selected_description = '';
1224
+ //this.selected_item = '';
1225
1225
  this.toChange();
1226
1226
  }
1227
1227
  }
@@ -1291,15 +1291,17 @@ class TCloudUiDataListComponent {
1291
1291
  let input = (e && e.target && e.target.value) ? e.target.value : '';
1292
1292
  let filter = (((input).normalize('NFD').replace(/[\u0300-\u036f]/g, "")).trim()).toLowerCase();
1293
1293
  let ul = document.getElementById(`${this.id}-options`);
1294
- let li = ul.getElementsByTagName("button");
1295
- for (let i = 0; i < li.length; i++) {
1296
- const a = li[i];
1297
- const txtValue = (((a.textContent || a.innerText).normalize('NFD').replace(/[\u0300-\u036f]/g, "")).trim()).toLowerCase();
1298
- if (txtValue.indexOf(filter) > -1) {
1299
- li[i].style.display = "";
1300
- }
1301
- else {
1302
- li[i].style.display = "none";
1294
+ if (ul) {
1295
+ let li = ul.getElementsByTagName("button");
1296
+ for (let i = 0; i < li.length; i++) {
1297
+ const a = li[i];
1298
+ const txtValue = (((a.textContent || a.innerText).normalize('NFD').replace(/[\u0300-\u036f]/g, "")).trim()).toLowerCase();
1299
+ if (txtValue.indexOf(filter) > -1) {
1300
+ li[i].style.display = "";
1301
+ }
1302
+ else {
1303
+ li[i].style.display = "none";
1304
+ }
1303
1305
  }
1304
1306
  }
1305
1307
  }