ywana-core8 0.0.106 → 0.0.110

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.
@@ -4296,9 +4296,13 @@ var TableFilters = function TableFilters(props) {
4296
4296
 
4297
4297
 
4298
4298
  var TableEditor = function TableEditor(props) {
4299
- var check = function check(id, value) {
4299
+ var checkOne = function checkOne(id, field, value) {
4300
+ check([id], value);
4301
+ return Promise.resolve();
4302
+ };
4303
+
4304
+ var check = function check(ids, value) {
4300
4305
  try {
4301
- var ids = Array.isArray(id) ? id : [id];
4302
4306
  pageContext.check(ids, value);
4303
4307
  setPageContext(Object.assign({}, pageContext));
4304
4308
  return Promise.resolve();
@@ -4404,16 +4408,14 @@ var TableEditor = function TableEditor(props) {
4404
4408
  id: field.id,
4405
4409
  label: field.label,
4406
4410
  type: field.type,
4407
- onChange: field.id === "checked" ? function (rowID, id, value) {
4408
- check(rowId, value);
4409
- } : field.editable ? change : null,
4411
+ onChange: field.id === "checked" ? checkOne : field.editable ? change : null,
4410
4412
 
4411
4413
  /* checked has it´s own handler */
4412
4414
  options: options
4413
4415
  };
4414
4416
  }),
4415
4417
  rows: groups[groupName].map(function (item) {
4416
- item.checked = pageContext.checked.has(item.id);
4418
+ item.checked = pageContext.checked ? pageContext.checked.has(item.id) : false;
4417
4419
  item.actions = actions ? actions.map(function (_action) {
4418
4420
  return _action.filter ? _action.filter(item) ? /*#__PURE__*/React.createElement(Icon, {
4419
4421
  icon: _action.icon,
@@ -4471,7 +4473,6 @@ var TableEditor = function TableEditor(props) {
4471
4473
  });
4472
4474
  }
4473
4475
 
4474
- console.log('table page checked', pageContext.checked);
4475
4476
  return /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement(Header, {
4476
4477
  icon: icon,
4477
4478
  title: /*#__PURE__*/React.createElement(Text, null, title)
@@ -4486,7 +4487,7 @@ var TableEditor = function TableEditor(props) {
4486
4487
  }, renderGroups()));
4487
4488
  };
4488
4489
  /**
4489
- * table Context
4490
+ * Table Context
4490
4491
  */
4491
4492
 
4492
4493