@nokecy/qc-ui 0.3.5 → 0.3.6

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.
@@ -150,6 +150,8 @@ var FormRender = function FormRender(props) {
150
150
  };
151
151
 
152
152
  var getSchema = function getSchema() {
153
+ var _columns, _columns2;
154
+
153
155
  var rootSchema = {
154
156
  type: 'object',
155
157
  properties: {}
@@ -174,9 +176,9 @@ var FormRender = function FormRender(props) {
174
176
  console.log("state", state);
175
177
  return _objectSpread(_objectSpread({}, colDef), state);
176
178
  });
177
- columns = columns.filter(function (i) {
179
+ columns = columns ? (_columns = columns) === null || _columns === void 0 ? void 0 : _columns.filter(function (i) {
178
180
  return (i === null || i === void 0 ? void 0 : i.visible) != false && !(i !== null && i !== void 0 && i.hide) && !(i !== null && i !== void 0 && i.hideInSearch) || (i === null || i === void 0 ? void 0 : i.hideInTable);
179
- });
181
+ }) : [];
180
182
  columns.map(function (col) {
181
183
  var _colDef$queryField;
182
184
 
@@ -214,7 +216,7 @@ var FormRender = function FormRender(props) {
214
216
 
215
217
  rootSchema.properties["grid"] = gridSchema;
216
218
 
217
- if (!columns.length) {
219
+ if (!((_columns2 = columns) !== null && _columns2 !== void 0 && _columns2.length)) {
218
220
  ///@ts-ignore
219
221
  delete rootSchema.properties["grid"];
220
222
  }
@@ -129,6 +129,8 @@ var FormRender = function FormRender(props) {
129
129
  };
130
130
 
131
131
  var getSchema = function getSchema() {
132
+ var _columns, _columns2;
133
+
132
134
  var rootSchema = {
133
135
  type: 'object',
134
136
  properties: {}
@@ -153,9 +155,9 @@ var FormRender = function FormRender(props) {
153
155
  console.log("state", state);
154
156
  return _objectSpread(_objectSpread({}, colDef), state);
155
157
  });
156
- columns = columns.filter(function (i) {
158
+ columns = columns ? (_columns = columns) === null || _columns === void 0 ? void 0 : _columns.filter(function (i) {
157
159
  return (i === null || i === void 0 ? void 0 : i.visible) != false && !(i !== null && i !== void 0 && i.hide) && !(i !== null && i !== void 0 && i.hideInSearch) || (i === null || i === void 0 ? void 0 : i.hideInTable);
158
- });
160
+ }) : [];
159
161
  columns.map(function (col) {
160
162
  var _colDef$queryField;
161
163
 
@@ -193,7 +195,7 @@ var FormRender = function FormRender(props) {
193
195
 
194
196
  rootSchema.properties["grid"] = gridSchema;
195
197
 
196
- if (!columns.length) {
198
+ if (!((_columns2 = columns) !== null && _columns2 !== void 0 && _columns2.length)) {
197
199
  ///@ts-ignore
198
200
  delete rootSchema.properties["grid"];
199
201
  }