ywana-core8 0.0.439 → 0.0.442
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 +5 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.modern.js +5 -2
- package/dist/index.modern.js.map +1 -1
- package/dist/index.umd.js +5 -2
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/domain/CollectionPage.js +1 -1
- package/src/domain/ContentViewer.js +2 -1
package/package.json
CHANGED
@@ -326,7 +326,7 @@ const CollectionAPI = (url, host) => {
|
|
326
326
|
|
327
327
|
return {
|
328
328
|
all(filters, page) {
|
329
|
-
let queryParams = page ?
|
329
|
+
let queryParams = page ? `?page=${page}&` : "?"
|
330
330
|
if (filters) {
|
331
331
|
const filterQuery = Object.keys(filters).reduce((query, key) => {
|
332
332
|
const value = filters[key]
|
@@ -45,9 +45,10 @@ export const ContentViewer = (props) => {
|
|
45
45
|
const FieldViewer = (props) => {
|
46
46
|
|
47
47
|
const { field, value } = props
|
48
|
-
const { type, item, label, visible = true } = field
|
48
|
+
const { type, item, label, visible = true, optional = false } = field
|
49
49
|
|
50
50
|
if (!visible) return null
|
51
|
+
if (optional === true && !value) return null
|
51
52
|
|
52
53
|
switch (type) {
|
53
54
|
case TYPES.STRING:
|