ywana-core8 0.0.578 → 0.0.579

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.578",
3
+ "version": "0.0.579",
4
4
  "description": "ywana-core8",
5
5
  "homepage": "https://ywana.github.io/workspace",
6
6
  "author": "Ernesto Roldan Garcia",
@@ -333,20 +333,22 @@ const TableFilters = (props) => {
333
333
  }, [schema])
334
334
 
335
335
  useEffect(() => {
336
- if (filters && !equal(filters, form)) setForm(filters)
336
+ if (filters) setForm(filters)
337
337
  }, [filters])
338
338
 
339
339
  useEffect(() => {
340
- if (pageContext.changeFilters && !equal(filters,form)) {
341
- pageContext.changeFilters(form)
342
- setPageContext(Object.assign({}, pageContext))
343
- }
340
+ reload()
344
341
  }, [form])
345
342
 
346
343
  async function change(next) {
347
344
  setForm(next)
348
345
  }
349
346
 
347
+ async function reload() {
348
+ await pageContext.load(form, likes)
349
+ setPageContext(Object.assign({}, pageContext))
350
+ }
351
+
350
352
  function clear() {
351
353
  change({})
352
354
  }
@@ -382,13 +384,6 @@ export const TableEditor = (props) => {
382
384
  const { icon, title, schema, editable, canDelete, filter, actions, tabs, className } = props
383
385
  const [groupBy, setGroupBy] = useState(props.groupBy)
384
386
 
385
- useEffect(async () => {
386
- if (filters) {
387
- await pageContext.load(filters)
388
- setPageContext(Object.assign({}, pageContext))
389
- }
390
- }, [filters])
391
-
392
387
  function changeGroup(id, value) {
393
388
  setGroupBy(value)
394
389
  }