mirror of
https://github.com/nocobase/nocobase
synced 2024-11-15 08:47:20 +00:00
Merge branch 'main' into next
This commit is contained in:
commit
e1aa2e9e0a
@ -853,7 +853,7 @@ export const useUpdateActionProps = () => {
|
||||
const form = useForm();
|
||||
const filterByTk = useFilterByTk();
|
||||
const { field, resource, __parent } = useBlockRequestContext();
|
||||
const { setVisible, setSubmitted, setFormValueChanged } = useActionContext();
|
||||
const { setVisible, setFormValueChanged } = useActionContext();
|
||||
const actionSchema = useFieldSchema();
|
||||
const navigate = useNavigateNoUpdate();
|
||||
const { fields, getField, name } = useCollection_deprecated();
|
||||
@ -867,7 +867,7 @@ export const useUpdateActionProps = () => {
|
||||
const { getActiveFieldsName } = useFormActiveFields() || {};
|
||||
|
||||
return {
|
||||
async onClick() {
|
||||
async onClick(e?, callBack?) {
|
||||
const {
|
||||
assignedValues: originalAssignedValues = {},
|
||||
onSuccess,
|
||||
@ -930,8 +930,10 @@ export const useUpdateActionProps = () => {
|
||||
});
|
||||
actionField.data.loading = false;
|
||||
// __parent?.service?.refresh?.();
|
||||
if (callBack) {
|
||||
callBack?.();
|
||||
}
|
||||
setVisible?.(false);
|
||||
setSubmitted?.(true);
|
||||
setFormValueChanged?.(false);
|
||||
if (!onSuccess?.successMessage) {
|
||||
return;
|
||||
|
@ -172,6 +172,7 @@ export const Action: ComposedAction = withDynamicSchemaProps(
|
||||
run,
|
||||
confirm,
|
||||
modal,
|
||||
setSubmitted: setParentSubmitted,
|
||||
};
|
||||
|
||||
const buttonElement = RenderButton(buttonProps);
|
||||
@ -304,6 +305,7 @@ function RenderButton({
|
||||
run,
|
||||
confirm,
|
||||
modal,
|
||||
setSubmitted,
|
||||
}) {
|
||||
const { t } = useTranslation();
|
||||
const { isPopupVisibleControlledByURL } = usePopupSettings();
|
||||
@ -322,6 +324,7 @@ function RenderButton({
|
||||
if (onClick) {
|
||||
onClick(e, () => {
|
||||
if (refreshDataBlockRequest !== false) {
|
||||
setSubmitted?.(true);
|
||||
service?.refresh?.();
|
||||
}
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user