@nokecy/qc-ui 0.2.2 → 0.2.3

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.
@@ -23,12 +23,16 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
23
23
  var ArrayTable = function ArrayTable(props) {
24
24
  var height = props.height;
25
25
  var apiRef = (0, _react.useRef)();
26
- var ref = (0, _react.useRef)();
27
26
  var field = (0, _react2.useField)();
28
27
  var dataSource = Array.isArray(field.value) ? field.value.slice() : [];
29
28
  var sources = (0, _utils.useArrayTableSources)();
30
29
  var columns = (0, _utils.useArrayTableColumns)(dataSource, field, sources);
31
- return /*#__PURE__*/_react.default.createElement(_agGridReact.AgGridReact, {
30
+ console.log("columns", sources);
31
+ return /*#__PURE__*/_react.default.createElement("div", {
32
+ style: {
33
+ height: height ? height : 400
34
+ }
35
+ }, /*#__PURE__*/_react.default.createElement(_agGridReact.AgGridReact, {
32
36
  onGridReady: function onGridReady(params) {
33
37
  apiRef.current = params.api;
34
38
  },
@@ -50,7 +54,7 @@ var ArrayTable = function ArrayTable(props) {
50
54
  pagination: false,
51
55
  columnDefs: columns,
52
56
  rowData: dataSource
53
- });
57
+ }));
54
58
  };
55
59
 
56
60
  var _default = ArrayTable;
@@ -128,7 +128,7 @@ var useArrayTableColumns = function useArrayTableColumns(dataSource, field, sour
128
128
  columnProps = _ref2.columnProps,
129
129
  schema = _ref2.schema,
130
130
  display = _ref2.display;
131
- if (display !== 'visible') return buf;
131
+ if (display && display !== 'visible') return buf;
132
132
  if (!isColumnComponent(schema)) return buf;
133
133
  return buf.concat(_objectSpread(_objectSpread({}, columnProps), {}, {
134
134
  //@ts-ignore
@@ -6,12 +6,16 @@ import { useArrayTableColumns, useArrayTableSources } from "./utils"; //@ts-igno
6
6
  var ArrayTable = function ArrayTable(props) {
7
7
  var height = props.height;
8
8
  var apiRef = useRef();
9
- var ref = useRef();
10
9
  var field = useField();
11
10
  var dataSource = Array.isArray(field.value) ? field.value.slice() : [];
12
11
  var sources = useArrayTableSources();
13
12
  var columns = useArrayTableColumns(dataSource, field, sources);
14
- return /*#__PURE__*/React.createElement(AgGridReact, {
13
+ console.log("columns", sources);
14
+ return /*#__PURE__*/React.createElement("div", {
15
+ style: {
16
+ height: height ? height : 400
17
+ }
18
+ }, /*#__PURE__*/React.createElement(AgGridReact, {
15
19
  onGridReady: function onGridReady(params) {
16
20
  apiRef.current = params.api;
17
21
  },
@@ -33,7 +37,7 @@ var ArrayTable = function ArrayTable(props) {
33
37
  pagination: false,
34
38
  columnDefs: columns,
35
39
  rowData: dataSource
36
- });
40
+ }));
37
41
  };
38
42
 
39
43
  export default ArrayTable;
@@ -105,7 +105,7 @@ var useArrayTableColumns = function useArrayTableColumns(dataSource, field, sour
105
105
  columnProps = _ref2.columnProps,
106
106
  schema = _ref2.schema,
107
107
  display = _ref2.display;
108
- if (display !== 'visible') return buf;
108
+ if (display && display !== 'visible') return buf;
109
109
  if (!isColumnComponent(schema)) return buf;
110
110
  return buf.concat(_objectSpread(_objectSpread({}, columnProps), {}, {
111
111
  //@ts-ignore