ywana-core8 0.0.152 → 0.0.153

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.
@@ -972,7 +972,8 @@ var DropDown = function DropDown(props) {
972
972
  var canShow = open == true && Array.isArray(options);
973
973
 
974
974
  if (canShow) {
975
- var filterActive = canFilter && label && label.length > 0;
975
+ var filterActive = canFilter === true && label && label.length > 0;
976
+ console.log('Dropdown filterActive', filterActive, canFilter, label);
976
977
  var items = filterActive ? options.filter(function (option) {
977
978
  return option.label.toUpperCase().indexOf(label.toUpperCase()) >= 0;
978
979
  }) : options;
@@ -4428,18 +4429,18 @@ var TableEditor = function TableEditor(props) {
4428
4429
 
4429
4430
  var remove = function remove(id) {
4430
4431
  try {
4431
- var confirm = site.confirm("Are you sure ?");
4432
-
4433
- var _temp2 = function () {
4434
- if (confirm) {
4435
- return Promise.resolve(pageContext.remove(id)).then(function () {
4436
- pageContext.clear();
4437
- setPageContext(Object.assign({}, pageContext));
4438
- });
4439
- }
4440
- }();
4432
+ return Promise.resolve(site.confirm("Are you sure ?")).then(function (confirm) {
4433
+ var _temp = function () {
4434
+ if (confirm) {
4435
+ return Promise.resolve(pageContext.remove(id)).then(function () {
4436
+ pageContext.clear();
4437
+ setPageContext(Object.assign({}, pageContext));
4438
+ });
4439
+ }
4440
+ }();
4441
4441
 
4442
- return Promise.resolve(_temp2 && _temp2.then ? _temp2.then(function () {}) : void 0);
4442
+ if (_temp && _temp.then) return _temp.then(function () {});
4443
+ });
4443
4444
  } catch (e) {
4444
4445
  return Promise.reject(e);
4445
4446
  }
@@ -4616,7 +4617,7 @@ var TableContext = function TableContext(url, field) {
4616
4617
  try {
4617
4618
  var _this2 = this;
4618
4619
 
4619
- var _temp4 = _catch(function () {
4620
+ var _temp3 = _catch(function () {
4620
4621
  var filters = filter ? Object.keys(filter).reduce(function (filters, key) {
4621
4622
  var field = filter[key];
4622
4623
  if (field) filters[key] = field;
@@ -4629,7 +4630,7 @@ var TableContext = function TableContext(url, field) {
4629
4630
  console.log(error);
4630
4631
  });
4631
4632
 
4632
- return Promise.resolve(_temp4 && _temp4.then ? _temp4.then(function () {}) : void 0);
4633
+ return Promise.resolve(_temp3 && _temp3.then ? _temp3.then(function () {}) : void 0);
4633
4634
  } catch (e) {
4634
4635
  return Promise.reject(e);
4635
4636
  }
@@ -4664,7 +4665,7 @@ var TableContext = function TableContext(url, field) {
4664
4665
  try {
4665
4666
  var _this5 = this;
4666
4667
 
4667
- var _temp6 = _catch(function () {
4668
+ var _temp5 = _catch(function () {
4668
4669
  return Promise.resolve(API.create(form)).then(function () {
4669
4670
  return Promise.resolve(_this5.load()).then(function () {});
4670
4671
  });
@@ -4672,7 +4673,7 @@ var TableContext = function TableContext(url, field) {
4672
4673
  console.log(error);
4673
4674
  });
4674
4675
 
4675
- return Promise.resolve(_temp6 && _temp6.then ? _temp6.then(function () {}) : void 0);
4676
+ return Promise.resolve(_temp5 && _temp5.then ? _temp5.then(function () {}) : void 0);
4676
4677
  } catch (e) {
4677
4678
  return Promise.reject(e);
4678
4679
  }
@@ -4681,7 +4682,7 @@ var TableContext = function TableContext(url, field) {
4681
4682
  try {
4682
4683
  var _this7 = this;
4683
4684
 
4684
- var _temp8 = _catch(function () {
4685
+ var _temp7 = _catch(function () {
4685
4686
  return Promise.resolve(API.update(form)).then(function () {
4686
4687
  return Promise.resolve(_this7.load()).then(function () {});
4687
4688
  });
@@ -4689,7 +4690,7 @@ var TableContext = function TableContext(url, field) {
4689
4690
  console.log(error);
4690
4691
  });
4691
4692
 
4692
- return Promise.resolve(_temp8 && _temp8.then ? _temp8.then(function () {}) : void 0);
4693
+ return Promise.resolve(_temp7 && _temp7.then ? _temp7.then(function () {}) : void 0);
4693
4694
  } catch (e) {
4694
4695
  return Promise.reject(e);
4695
4696
  }
@@ -4698,7 +4699,7 @@ var TableContext = function TableContext(url, field) {
4698
4699
  try {
4699
4700
  var _this9 = this;
4700
4701
 
4701
- var _temp10 = _catch(function () {
4702
+ var _temp9 = _catch(function () {
4702
4703
  return Promise.resolve(API.remove(id)).then(function () {
4703
4704
  return Promise.resolve(_this9.load()).then(function () {});
4704
4705
  });
@@ -4706,7 +4707,7 @@ var TableContext = function TableContext(url, field) {
4706
4707
  console.log(error);
4707
4708
  });
4708
4709
 
4709
- return Promise.resolve(_temp10 && _temp10.then ? _temp10.then(function () {}) : void 0);
4710
+ return Promise.resolve(_temp9 && _temp9.then ? _temp9.then(function () {}) : void 0);
4710
4711
  } catch (e) {
4711
4712
  return Promise.reject(e);
4712
4713
  }