ywana-core8 0.0.107 → 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/dist/index.cjs +12 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.modern.js +12 -4
- package/dist/index.modern.js.map +1 -1
- package/dist/index.umd.js +12 -4
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/domain/TablePage.js +7 -4
package/package.json
CHANGED
package/src/domain/TablePage.js
CHANGED
@@ -224,13 +224,16 @@ const TableEditor = (props) => {
|
|
224
224
|
setPageContext(Object.assign({}, pageContext))
|
225
225
|
}
|
226
226
|
|
227
|
-
async function check(
|
228
|
-
console.log('check() ',id, value, t)
|
229
|
-
const ids = Array.isArray(id) ? id : [id]
|
227
|
+
async function check(ids, value) {
|
230
228
|
pageContext.check(ids, value)
|
231
229
|
setPageContext(Object.assign({}, pageContext))
|
232
230
|
}
|
233
231
|
|
232
|
+
async function checkOne(id, field, value) {
|
233
|
+
console.log("checkOne", id, field, value)
|
234
|
+
checkAll([id], value)
|
235
|
+
}
|
236
|
+
|
234
237
|
function run(action, item) {
|
235
238
|
action.action(item.id, pageContext, async () => {
|
236
239
|
await pageContext.load()
|
@@ -264,7 +267,7 @@ const TableEditor = (props) => {
|
|
264
267
|
id: field.id,
|
265
268
|
label: field.label,
|
266
269
|
type: field.type,
|
267
|
-
onChange: field.id === "checked" ?
|
270
|
+
onChange: field.id === "checked" ? checkOne : field.editable ? change : null, /* checked has it´s own handler */
|
268
271
|
options
|
269
272
|
}
|
270
273
|
}),
|