@quansitech/antd-admin 1.1.44 → 1.1.45

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.
@@ -76,7 +76,7 @@ export default function (props) {
76
76
  if ((_props$fieldProps2 = props.fieldProps) !== null && _props$fieldProps2 !== void 0 && _props$fieldProps2.extraRenderValues) {
77
77
  var _props$fieldProps$ext;
78
78
  var index = -1;
79
- if (tableContext && tableContext !== null && tableContext !== void 0 && tableContext.dataSource) {
79
+ if (tableContext && tableContext !== null && tableContext !== void 0 && tableContext.dataSource && props.record) {
80
80
  var key = tableContext.getTableProps().rowKey;
81
81
  index = tableContext.dataSource.findIndex(function (item) {
82
82
  return item[key] === props.record[key];
@@ -108,7 +108,7 @@ export default function (props) {
108
108
  if ((_props$fieldProps3 = props.fieldProps) !== null && _props$fieldProps3 !== void 0 && _props$fieldProps3.extraRenderValues) {
109
109
  var _props$fieldProps$ext;
110
110
  var index = -1;
111
- if (tableContext && tableContext !== null && tableContext !== void 0 && tableContext.dataSource) {
111
+ if (tableContext && tableContext !== null && tableContext !== void 0 && tableContext.dataSource && props.record) {
112
112
  var key = tableContext.getTableProps().rowKey;
113
113
  index = tableContext.dataSource.findIndex(function (item) {
114
114
  return item[key] === props.record[key];
@@ -223,6 +223,7 @@ export default function (props) {
223
223
  setSearchUrl(s);
224
224
  }
225
225
  setLastQuery(props.defaultSearchValue || {});
226
+ setDataSource(postData(props.dataSource || []));
226
227
  if (!modalContext.inModal) {
227
228
  var query = qs.parse(window.location.search.replace(/^\?/, ''));
228
229
  if (query && Object.keys(query).length) {
@@ -10,7 +10,7 @@ export declare function modalShow(options: ModalOptions): Promise<{
10
10
  update: (configUpdate: ModalFuncProps | ((prevConfig: ModalFuncProps) => ModalFuncProps)) => void;
11
11
  }>;
12
12
  export declare function upperFirst(str: string): string;
13
- export declare function getProValueTypeMap(): any;
13
+ export declare function getProValueTypeMap(): Record<string, any>;
14
14
  export declare function handleCondition(condition: Condition, data: any): any;
15
15
  export declare function deepSet(obj: any, path: string, value: any): void;
16
16
  export declare function filterObjectKeys(obj: Record<string, any>, keysToFilter: string[]): Record<string, any>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quansitech/antd-admin",
3
- "version": "1.1.44",
3
+ "version": "1.1.45",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist"