fix: useCreateActionProps

This commit is contained in:
katherinehhh 2023-05-06 15:08:03 +08:00
parent 87c855c3de
commit e62704dd2e

View File

@ -31,9 +31,6 @@ export const Editable = observer((props: any) => {
if (['oho', 'obo', 'm2o'].includes(collectionField.interface)) { if (['oho', 'obo', 'm2o'].includes(collectionField.interface)) {
const value = { const value = {
...data, ...data,
[fieldNames.label]: data[fieldNames.label],
id: data.id,
value: data.id,
}; };
setTimeout(() => { setTimeout(() => {
form.setValuesIn(field.props.name, value); form.setValuesIn(field.props.name, value);
@ -42,9 +39,6 @@ export const Editable = observer((props: any) => {
const values = JSON.parse(JSON.stringify(form.values[fieldSchema.name])); const values = JSON.parse(JSON.stringify(form.values[fieldSchema.name]));
values.push({ values.push({
...data, ...data,
[fieldNames?.label]: data?.[fieldNames?.label],
id: data?.id,
value: data?.id,
}); });
setTimeout(() => { setTimeout(() => {
form.setValuesIn(field.props.name, values); form.setValuesIn(field.props.name, values);