ywana-core8 0.0.458 → 0.0.461
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 -14
- package/dist/index.cjs.map +1 -1
- package/dist/index.modern.js +21 -14
- package/dist/index.modern.js.map +1 -1
- package/dist/index.umd.js +21 -14
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/domain/CollectionPage.js +1 -5
- package/src/domain/TablePage.js +15 -4
package/package.json
CHANGED
@@ -15,7 +15,7 @@ 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
|
|
@@ -24,10 +24,6 @@ export const CollectionPage = (props) => {
|
|
24
24
|
setPageContext(context)
|
25
25
|
}, [])
|
26
26
|
|
27
|
-
useEffect(() => {
|
28
|
-
if (version>0) reload()
|
29
|
-
}, [version])
|
30
|
-
|
31
27
|
async function reload() {
|
32
28
|
await pageContext.load()
|
33
29
|
setPageContext(Object.assign({}, pageContext))
|
package/src/domain/TablePage.js
CHANGED
@@ -187,12 +187,23 @@ 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
|
+
|
195
|
+
console.log("TableSelector ",columns, schema)
|
196
|
+
|
190
197
|
const rows = all.filter(item => checked.has(item.id))
|
191
198
|
const table = {
|
192
|
-
columns
|
193
|
-
|
194
|
-
|
195
|
-
|
199
|
+
columns,
|
200
|
+
/*
|
201
|
+
columns: [
|
202
|
+
{ id: "id", label: "ID" },
|
203
|
+
{ id: "idMatricula", label: "ID Matricula" },
|
204
|
+
{ id: "flow", "Circuito"},
|
205
|
+
],
|
206
|
+
*/
|
196
207
|
rows: rows || []
|
197
208
|
}
|
198
209
|
const buttons = actions.map(({ label, action }) => {
|