ywana-core8 0.0.542 → 0.0.543

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.542",
3
+ "version": "0.0.543",
4
4
  "description": "ywana-core8",
5
5
  "homepage": "https://ywana.github.io/workspace",
6
6
  "author": "Ernesto Roldan Garcia",
@@ -18,7 +18,7 @@ export const TablePage = (props) => {
18
18
  const site = useContext(SiteContext)
19
19
  const { id = "table",
20
20
  icon, title, name,
21
- schema, url, field, host,
21
+ schema, url, field, host, params,
22
22
  autosave = true, delay = 1000,
23
23
  editable,
24
24
  actions = [], dev = false, tableActions, selectionActions = [],
@@ -31,7 +31,7 @@ export const TablePage = (props) => {
31
31
  } = props
32
32
 
33
33
  const [pageContext, setPageContext] = useContext(PageContext)
34
- const context = TableContext(url, field, host, urlQuery)
34
+ const context = TableContext(url, field, host, urlQuery, params)
35
35
  const { selected } = pageContext
36
36
  const timer = useRef(null)
37
37
  const [form, setForm] = useState(selected)
@@ -493,9 +493,9 @@ export const TableEditor = (props) => {
493
493
  /**
494
494
  * Table Context
495
495
  */
496
- const TableContext = (url, field, host, urlQuery) => {
496
+ const TableContext = (url, field, host, urlQuery, params) => {
497
497
 
498
- const API = TableAPI(url, host)
498
+ const API = TableAPI(url, host, params)
499
499
 
500
500
  return {
501
501
 
@@ -615,13 +615,13 @@ const TableContext = (url, field, host, urlQuery) => {
615
615
  /**
616
616
  * table API
617
617
  */
618
- const TableAPI = (url, host) => {
618
+ const TableAPI = (url, host, params) => {
619
619
 
620
620
  const http = HTTPClient(host || window.API || process.env.REACT_APP_API, Session);
621
621
 
622
622
  return {
623
623
  all(filters) {
624
- let queryParams = "?"
624
+ let queryParams = "?" + params
625
625
  if (filters) {
626
626
  const filterQuery = Object.keys(filters).reduce((query, key) => {
627
627
  const value = filters[key]
@@ -639,7 +639,7 @@ const TableAPI = (url, host) => {
639
639
  }, "")
640
640
  queryParams = queryParams.concat(filterQuery)
641
641
  }
642
- return http.GET(url + queryParams)
642
+ return http.GET(url + queryParams )
643
643
  },
644
644
 
645
645
  find(id) {