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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ywana-core8",
3
- "version": "0.0.22",
3
+ "version": "0.0.23",
4
4
  "description": "ywana-core8",
5
5
  "author": "Ernesto Roldan Garcia",
6
6
  "license": "MIT",
@@ -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
 
@@ -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
@@ -24,7 +24,7 @@ export const Tabs = (props) => {
24
24
  return (
25
25
  <div class="tabs">
26
26
  {tabs}
27
- <div class="tab-filler" />
27
+ <div className="tab-filler" />
28
28
  </div>
29
29
  )
30
30
  }
@@ -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)