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.
package/dist/index.cjs CHANGED
@@ -4303,9 +4303,13 @@ var TableFilters = function TableFilters(props) {
4303
4303
 
4304
4304
 
4305
4305
  var TableEditor = function TableEditor(props) {
4306
- var check = function check(id, value) {
4306
+ var checkOne = function checkOne(id, field, value) {
4307
+ check([id], value);
4308
+ return Promise.resolve();
4309
+ };
4310
+
4311
+ var check = function check(ids, value) {
4307
4312
  try {
4308
- var ids = Array.isArray(id) ? id : [id];
4309
4313
  pageContext.check(ids, value);
4310
4314
  setPageContext(Object.assign({}, pageContext));
4311
4315
  return Promise.resolve();
@@ -4411,16 +4415,14 @@ var TableEditor = function TableEditor(props) {
4411
4415
  id: field.id,
4412
4416
  label: field.label,
4413
4417
  type: field.type,
4414
- onChange: field.id === "checked" ? function (rowID, id, value) {
4415
- check(rowId, value);
4416
- } : field.editable ? change : null,
4418
+ onChange: field.id === "checked" ? checkOne : field.editable ? change : null,
4417
4419
 
4418
4420
  /* checked has it´s own handler */
4419
4421
  options: options
4420
4422
  };
4421
4423
  }),
4422
4424
  rows: groups[groupName].map(function (item) {
4423
- item.checked = pageContext.checked.has(item.id);
4425
+ item.checked = pageContext.checked ? pageContext.checked.has(item.id) : false;
4424
4426
  item.actions = actions ? actions.map(function (_action) {
4425
4427
  return _action.filter ? _action.filter(item) ? /*#__PURE__*/React__default["default"].createElement(Icon, {
4426
4428
  icon: _action.icon,
@@ -4478,7 +4480,6 @@ var TableEditor = function TableEditor(props) {
4478
4480
  });
4479
4481
  }
4480
4482
 
4481
- console.log('table page checked', pageContext.checked);
4482
4483
  return /*#__PURE__*/React__default["default"].createElement(React.Fragment, null, /*#__PURE__*/React__default["default"].createElement(Header, {
4483
4484
  icon: icon,
4484
4485
  title: /*#__PURE__*/React__default["default"].createElement(Text, null, title)
@@ -4493,7 +4494,7 @@ var TableEditor = function TableEditor(props) {
4493
4494
  }, renderGroups()));
4494
4495
  };
4495
4496
  /**
4496
- * table Context
4497
+ * Table Context
4497
4498
  */
4498
4499
 
4499
4500