ywana-core8 0.0.457 → 0.0.460
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 +21 -12
- package/dist/index.cjs.map +1 -1
- package/dist/index.modern.js +21 -12
- package/dist/index.modern.js.map +1 -1
- package/dist/index.umd.js +21 -12
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/domain/CollectionPage.js +2 -2
- package/src/domain/TablePage.js +13 -4
package/package.json
CHANGED
@@ -15,14 +15,14 @@ import "./CollectionPage.css"
|
|
15
15
|
export const CollectionPage = (props) => {
|
16
16
|
|
17
17
|
const site = useContext(SiteContext)
|
18
|
-
const {
|
18
|
+
const { id = "collection", icon, title, name = "Collection 1", schema, url, page, host, groupBy, editor, field, autosave = false, delay = 1000, actions, levels, onSelect, children } = props
|
19
19
|
const [pageContext, setPageContext] = useContext(PageContext)
|
20
20
|
const context = CollectionContext(url, field, host, page)
|
21
21
|
|
22
22
|
useEffect(async () => {
|
23
23
|
await context.load()
|
24
24
|
setPageContext(context)
|
25
|
-
}, [
|
25
|
+
}, [])
|
26
26
|
|
27
27
|
async function reload() {
|
28
28
|
await pageContext.load()
|
package/src/domain/TablePage.js
CHANGED
@@ -187,12 +187,21 @@ const TableSelector = (props) => {
|
|
187
187
|
const { all, checked } = pageContext
|
188
188
|
|
189
189
|
const count = `${checked.size}/${all.length}`
|
190
|
+
|
191
|
+
const columns = Object.keys(schema)
|
192
|
+
.filter(key => schema[key].selectorColumn === true)
|
193
|
+
.map(field => ({id: field.id, label: field.label }))
|
194
|
+
|
190
195
|
const rows = all.filter(item => checked.has(item.id))
|
191
196
|
const table = {
|
192
|
-
columns
|
193
|
-
|
194
|
-
|
195
|
-
|
197
|
+
columns,
|
198
|
+
/*
|
199
|
+
columns: [
|
200
|
+
{ id: "id", label: "ID" },
|
201
|
+
{ id: "idMatricula", label: "ID Matricula" },
|
202
|
+
{ id: "flow", "Circuito"},
|
203
|
+
],
|
204
|
+
*/
|
196
205
|
rows: rows || []
|
197
206
|
}
|
198
207
|
const buttons = actions.map(({ label, action }) => {
|