@yuntijs/ui 1.0.0-beta.106 → 1.0.0-beta.107

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.
@@ -2,6 +2,9 @@ import { type FormListOperation } from 'antd';
2
2
  import React from 'react';
3
3
  import type { FormCollapseListColumn } from '.';
4
4
  import { ListFieldValue } from './utils';
5
+ export interface FormCollapseListOperation extends FormListOperation {
6
+ update: () => void;
7
+ }
5
8
  export declare const useFormCollapseListHooks: (name: string, childrenColumnName: string, columns: FormCollapseListColumn[]) => {
6
9
  values: ListFieldValue[];
7
10
  updateValues: () => void;
@@ -12,6 +15,6 @@ export declare const useFormCollapseListHooks: (name: string, childrenColumnName
12
15
  allExpandRowKeys: React.Key[];
13
16
  };
14
17
  getFieldPath: (fieldKeyPath: number[], fieldName?: string) => any;
15
- getFormListOperation: (operation: FormListOperation, record: ListFieldValue) => FormListOperation;
18
+ getFormListOperation: (operation: FormListOperation, record: ListFieldValue) => FormCollapseListOperation;
16
19
  firstColumnFormItemName: any;
17
20
  };
@@ -138,6 +138,9 @@ export var useFormCollapseListHooks = function useFormCollapseListHooks(name, ch
138
138
  fieldValue[to] = _ref[1];
139
139
  form.setFieldValue(fieldName, fieldValue);
140
140
  updateValues();
141
+ },
142
+ update: function update() {
143
+ return updateValues();
141
144
  }
142
145
  };
143
146
  }, [childrenColumnName, expandedRowKeys, firstColumnFormItemName, form, getFieldPath, name, updateValues]);
@@ -1,10 +1,11 @@
1
- import type { FormItemProps, FormListOperation, TableColumnProps } from 'antd';
1
+ import type { FormItemProps, TableColumnProps } from 'antd';
2
2
  import type { FormListProps as AntFormListProps } from 'antd/es/form';
3
3
  import React from 'react';
4
4
  import { CollapseGroupProps } from '../../CollapseGroup';
5
+ import { FormCollapseListOperation } from './hooks';
5
6
  import { FieldPath } from './utils';
6
7
  interface FormCollapseListColumnItem extends Omit<FormItemProps, 'dependencies' | 'rules' | 'tooltip' | 'labelAlign' | 'labelCol' | 'colon' | 'children'> {
7
- render?: (fieldName: number, index: number, operation: FormListOperation,
8
+ render?: (fieldName: number, index: number, operation: FormCollapseListOperation,
8
9
  /** 当前 item 的 path */
9
10
  fieldPath: FieldPath) => React.ReactElement;
10
11
  rules?: FormItemProps['rules'] | ((parentFieldPath: FieldPath, index: number) => FormItemProps['rules']);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yuntijs/ui",
3
- "version": "1.0.0-beta.106",
3
+ "version": "1.0.0-beta.107",
4
4
  "description": "☁️ Yunti UI - an open-source UI component library for building Cloud Native web apps",
5
5
  "keywords": [
6
6
  "yuntijs",