ywana-core8 0.0.58 → 0.0.62
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 +10 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.modern.js +10 -3
- package/dist/index.modern.js.map +1 -1
- package/dist/index.umd.js +10 -3
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/domain/TablePage.js +6 -2
package/package.json
CHANGED
package/src/domain/TablePage.js
CHANGED
@@ -203,7 +203,7 @@ const TableEditor = (props) => {
|
|
203
203
|
setPageContext(Object.assign({}, pageContext))
|
204
204
|
}
|
205
205
|
|
206
|
-
function run(action) {
|
206
|
+
function run(action, item) {
|
207
207
|
action.action(item.id, pageContext, async () => {
|
208
208
|
await pageContext.load()
|
209
209
|
setPageContext(Object.assign({}, pageContext))
|
@@ -242,7 +242,11 @@ const TableEditor = (props) => {
|
|
242
242
|
}),
|
243
243
|
rows: groups[groupName]
|
244
244
|
.map(item => {
|
245
|
-
item.actions = actions ? actions.map(action =>
|
245
|
+
item.actions = actions ? actions.map(action => {
|
246
|
+
action.filter ?
|
247
|
+
action.filter(item) ? <Icon icon={action.icon} clickable size="small" action={() => run(action, item) }/> : 'x'
|
248
|
+
: <Icon icon={action.icon} clickable size="small" action={() => run(action, item) }/>
|
249
|
+
}) : []
|
246
250
|
item.actions.push(<Icon icon="delete" size="small" clickable action={() => remove(item.id)} />)
|
247
251
|
return item
|
248
252
|
})
|