fix: record picker did not refresh list after adding data (#2877)
This commit is contained in:
parent
0be4e6d94d
commit
74a6d49181
@ -263,7 +263,7 @@ export const useCreateActionProps = () => {
|
|||||||
|
|
||||||
export const useAssociationCreateActionProps = () => {
|
export const useAssociationCreateActionProps = () => {
|
||||||
const form = useForm();
|
const form = useForm();
|
||||||
const { field, resource } = useBlockRequestContext();
|
const { field, resource, __parent } = useBlockRequestContext();
|
||||||
const { setVisible, fieldSchema } = useActionContext();
|
const { setVisible, fieldSchema } = useActionContext();
|
||||||
const actionSchema = useFieldSchema();
|
const actionSchema = useFieldSchema();
|
||||||
const actionField = useField();
|
const actionField = useField();
|
||||||
@ -345,6 +345,7 @@ export const useAssociationCreateActionProps = () => {
|
|||||||
});
|
});
|
||||||
actionField.data.loading = false;
|
actionField.data.loading = false;
|
||||||
actionField.data.data = data;
|
actionField.data.data = data;
|
||||||
|
__parent?.service?.refresh?.();
|
||||||
setVisible?.(false);
|
setVisible?.(false);
|
||||||
if (!onSuccess?.successMessage) {
|
if (!onSuccess?.successMessage) {
|
||||||
return;
|
return;
|
||||||
|
Loading…
Reference in New Issue
Block a user