ywana-core8 0.0.104 → 0.0.108

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ywana-core8",
3
- "version": "0.0.104",
3
+ "version": "0.0.108",
4
4
  "description": "ywana-core8",
5
5
  "author": "Ernesto Roldan Garcia",
6
6
  "license": "MIT",
@@ -224,12 +224,16 @@ const TableEditor = (props) => {
224
224
  setPageContext(Object.assign({}, pageContext))
225
225
  }
226
226
 
227
- async function check(id, value) {
228
- const ids = Array.isArray(id) ? id : [id]
227
+ async function check(ids, value) {
229
228
  pageContext.check(ids, value)
230
229
  setPageContext(Object.assign({}, pageContext))
231
230
  }
232
231
 
232
+ async function checkOne(id, field, value) {
233
+ console.log("checkOne", id, field, value)
234
+ checkAll([id], value)
235
+ }
236
+
233
237
  function run(action, item) {
234
238
  action.action(item.id, pageContext, async () => {
235
239
  await pageContext.load()
@@ -263,7 +267,7 @@ const TableEditor = (props) => {
263
267
  id: field.id,
264
268
  label: field.label,
265
269
  type: field.type,
266
- onChange: field.id === "checked" ? check : field.editable ? change : null, /* checked has it´s own handler */
270
+ onChange: field.id === "checked" ? checkOne : field.editable ? change : null, /* checked has it´s own handler */
267
271
  options
268
272
  }
269
273
  }),