ywana-core8 0.0.22 → 0.0.23
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/ContentEditor.js +1 -1
- package/src/domain/TablePage.js +5 -0
- package/src/html/tab.js +1 -1
- package/src/html/tokenfield.js +1 -1
package/package.json
CHANGED
@@ -278,7 +278,7 @@ const NumberEditor = ({ field, value, onChange }) => {
|
|
278
278
|
/**
|
279
279
|
* List Editor
|
280
280
|
*/
|
281
|
-
export const ListEditor = ({ field, value, onChange }) => {
|
281
|
+
export const ListEditor = ({ field, value = [], onChange }) => {
|
282
282
|
|
283
283
|
const { label } = field
|
284
284
|
|
package/src/domain/TablePage.js
CHANGED
@@ -372,6 +372,11 @@ const TableAPI = (url) => {
|
|
372
372
|
const filterQuery = Object.keys(filters).reduce((query, key) => {
|
373
373
|
if (typeof (filters[key]) === 'boolean') {
|
374
374
|
return query.concat(`${key}=${filters[key]}&`)
|
375
|
+
} else if (Array.isArray(filters[key])) {
|
376
|
+
const param = filters[key].length === 0 ? '' : filters[key].reduce((param,field) => {
|
377
|
+
param.concat(`${key}=${field}&`)
|
378
|
+
}, '')
|
379
|
+
return query.concat(param)
|
375
380
|
} else {
|
376
381
|
return query.concat(`${key}=%${filters[key]}%&`)
|
377
382
|
}
|
package/src/html/tab.js
CHANGED
package/src/html/tokenfield.js
CHANGED
@@ -6,7 +6,7 @@ import './tokenfield.css'
|
|
6
6
|
/**
|
7
7
|
* Token Field
|
8
8
|
*/
|
9
|
-
export const TokenField = ({ id, label, init, onChange }) => {
|
9
|
+
export const TokenField = ({ id, label, init = [], onChange }) => {
|
10
10
|
const mounted = useRef(false)
|
11
11
|
const [value, setValue] = useState()
|
12
12
|
const [tokens, setTokens] = useState(init)
|