ywana-core8 0.0.29 → 0.0.34
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 +1 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.modern.js +1 -3
- package/dist/index.modern.js.map +1 -1
- package/dist/index.umd.js +1 -3
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/domain/TablePage.js +2 -11
package/package.json
CHANGED
package/src/domain/TablePage.js
CHANGED
@@ -369,30 +369,21 @@ const TableAPI = (url) => {
|
|
369
369
|
all(filters) {
|
370
370
|
let queryParams = "?"
|
371
371
|
if (filters) {
|
372
|
-
|
373
|
-
console.log('filters', filters)
|
374
|
-
|
375
372
|
const filterQuery = Object.keys(filters).reduce((query, key) => {
|
376
|
-
|
377
373
|
const value = filters[key]
|
378
|
-
|
379
374
|
if (typeof (value) === 'boolean') {
|
380
375
|
return query.concat(`${key}=${value}&`)
|
381
|
-
|
382
376
|
} else if (Array.isArray(value)) {
|
383
|
-
const param =
|
384
|
-
param.concat(`${key}=${item}&`)
|
377
|
+
const param = value.length === 0 ? '' : value.reduce((param,item) => {
|
378
|
+
param = param.concat(`${key}=${item}&`)
|
385
379
|
return param
|
386
380
|
}, "")
|
387
381
|
console.log(param)
|
388
382
|
return query.concat(param)
|
389
|
-
|
390
383
|
} else {
|
391
384
|
return query.concat(`${key}=%${filters[key]}%&`)
|
392
385
|
}
|
393
386
|
}, "")
|
394
|
-
|
395
|
-
console.log('filterQuery')
|
396
387
|
queryParams = queryParams.concat(filterQuery)
|
397
388
|
}
|
398
389
|
return http.GET(url + queryParams)
|