@nokecy/qc-ui 1.1.66 → 1.1.67

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.
@@ -140,11 +140,15 @@ var FormRender = function FormRender(props) {
140
140
  }
141
141
  };
142
142
  var columns = colDefs === null || colDefs === void 0 ? void 0 : colDefs.map(function (colDef) {
143
+ var _searchComponentProps;
143
144
  var state = columnStates.find(function (x) {
144
145
  return x.colId == colDef.field;
145
146
  });
146
147
  var columnDefs = gridApi === null || gridApi === void 0 ? void 0 : gridApi.getColumnDef(colDef.field);
147
- return _objectSpread(_objectSpread(_objectSpread({}, colDef), columnDefs), state);
148
+ // 查询组件属性(下拉选项)以本次传入的列为准:AG Grid 在本副作用之后才应用新 columnDefs,此刻取到的还是上一版。@author nokecy
149
+ return _objectSpread(_objectSpread(_objectSpread(_objectSpread({}, colDef), columnDefs), state), {}, {
150
+ searchComponentProps: (_searchComponentProps = colDef.searchComponentProps) !== null && _searchComponentProps !== void 0 ? _searchComponentProps : columnDefs === null || columnDefs === void 0 ? void 0 : columnDefs.searchComponentProps
151
+ });
148
152
  });
149
153
  columns = columns ? (_columns = columns) === null || _columns === void 0 ? void 0 : _columns.filter(function (i) {
150
154
  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);
@@ -132,11 +132,15 @@ var FormRender = function FormRender(props) {
132
132
  }
133
133
  };
134
134
  var columns = colDefs === null || colDefs === void 0 ? void 0 : colDefs.map(function (colDef) {
135
+ var _searchComponentProps;
135
136
  var state = columnStates.find(function (x) {
136
137
  return x.colId == colDef.field;
137
138
  });
138
139
  var columnDefs = gridApi === null || gridApi === void 0 ? void 0 : gridApi.getColumnDef(colDef.field);
139
- return _objectSpread(_objectSpread(_objectSpread({}, colDef), columnDefs), state);
140
+ // 查询组件属性(下拉选项)以本次传入的列为准:AG Grid 在本副作用之后才应用新 columnDefs,此刻取到的还是上一版。@author nokecy
141
+ return _objectSpread(_objectSpread(_objectSpread(_objectSpread({}, colDef), columnDefs), state), {}, {
142
+ searchComponentProps: (_searchComponentProps = colDef.searchComponentProps) !== null && _searchComponentProps !== void 0 ? _searchComponentProps : columnDefs === null || columnDefs === void 0 ? void 0 : columnDefs.searchComponentProps
143
+ });
140
144
  });
141
145
  columns = columns ? (_columns = columns) === null || _columns === void 0 ? void 0 : _columns.filter(function (i) {
142
146
  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);