fix: subtable to select field value missing

This commit is contained in:
katherinehhh 2023-05-08 21:50:52 +08:00
parent 3f90f231b9
commit f29ba777af

View File

@ -55,8 +55,7 @@ const useTableSelectorProps = () => {
export const useTableBlockProps = () => { export const useTableBlockProps = () => {
const field: any = useField(); const field: any = useField();
const tableProps = useTableP(); const tableProps = useTableP();
const { multiple, selectedRows, tableData, options, collectionField } = useContext(RecordPickerContext); const { tableData } = useContext(RecordPickerContext);
useEffect(() => { useEffect(() => {
field.value = tableData; field.value = tableData;
}, [tableData]); }, [tableData]);
@ -103,7 +102,6 @@ export const InternalSubTable: any = observer((props: any) => {
dragSort: false, dragSort: false,
}), }),
insertSubTable(schema.SubTable); insertSubTable(schema.SubTable);
field.value = [];
}, []); }, []);
const usePickActionProps = () => { const usePickActionProps = () => {