ywana-core8 0.0.456 → 0.0.457
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 +4 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.modern.js +4 -3
- package/dist/index.modern.js.map +1 -1
- package/dist/index.umd.js +4 -3
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/domain/CollectionPage.js +2 -2
- package/src/domain/ContentViewer.js +0 -2
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 { id = "collection", icon, title, name = "Collection 1", schema, url, page, host, groupBy, editor, field, autosave = false, delay = 1000, actions, levels, onSelect, children } = props
|
18
|
+
const { version=0, 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
|
+
}, [version])
|
26
26
|
|
27
27
|
async function reload() {
|
28
28
|
await pageContext.load()
|
@@ -48,8 +48,6 @@ const FieldViewer = (props) => {
|
|
48
48
|
const { type, item, label, visible = true, optional } = field
|
49
49
|
|
50
50
|
if (!visible) return null
|
51
|
-
|
52
|
-
console.log("FieldViewer Optional",field, value, optional && value === null)
|
53
51
|
if (optional && value === undefined ) return null;
|
54
52
|
|
55
53
|
switch (type) {
|