ywana-core8 0.0.281 → 0.0.282

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.281",
3
+ "version": "0.0.282",
4
4
  "description": "ywana-core8",
5
5
  "author": "Ernesto Roldan Garcia",
6
6
  "license": "MIT",
@@ -9,8 +9,6 @@ import { ContentViewer } from './ContentViewer'
9
9
  import { CreateContentDialog } from './CreateContentDialog'
10
10
  import "./TablePage.css"
11
11
 
12
- const http = HTTPClient(window.API || process.env.REACT_APP_API, Session);
13
-
14
12
  /**
15
13
  * Table Page
16
14
  */
@@ -19,7 +17,7 @@ export const TablePage = (props) => {
19
17
  const site = useContext(SiteContext)
20
18
  const { id = "table",
21
19
  icon, title, name,
22
- schema, url, field,
20
+ schema, url, field, host,
23
21
  autosave = true, delay = 1000,
24
22
  editable,
25
23
  actions = [], dev = false, tableActions, selectionActions = [],
@@ -47,7 +45,7 @@ export const TablePage = (props) => {
47
45
  }, [form])
48
46
 
49
47
  useEffect(async () => {
50
- const context = TableContext(url, field)
48
+ const context = TableContext(url, field, host)
51
49
  await context.load()
52
50
  setPageContext(context)
53
51
  }, [])
@@ -407,9 +405,9 @@ export const TableEditor = (props) => {
407
405
  /**
408
406
  * Table Context
409
407
  */
410
- const TableContext = (url, field) => {
408
+ const TableContext = (url, field, host) => {
411
409
 
412
- const API = TableAPI(url)
410
+ const API = TableAPI(url, host)
413
411
 
414
412
  return {
415
413
 
@@ -491,7 +489,9 @@ const TableContext = (url, field) => {
491
489
  /**
492
490
  * table API
493
491
  */
494
- const TableAPI = (url) => {
492
+ const TableAPI = (url, host) => {
493
+
494
+ const http = HTTPClient(host || window.API || process.env.REACT_APP_API, Session);
495
495
 
496
496
  return {
497
497
  all(filters) {
package/src/site/view.css CHANGED
@@ -10,6 +10,8 @@
10
10
  display: flex;
11
11
  align-items: center;
12
12
  background-color: rgb(200,200,200);
13
+ height: 2rem;
14
+ padding-left: 1rem;
13
15
  }
14
16
 
15
17
  .view>header>label {