fix: button of details is not refresh when updating record (#2977)

This commit is contained in:
被雨水过滤的空气-Rain 2023-11-06 21:18:55 +08:00 committed by GitHub
parent 2f7c5fcb4b
commit 10a1f65284
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View File

@ -2,7 +2,7 @@ import { observer, RecursionField, useField, useFieldSchema, useForm } from '@fo
import { isPortalInBody } from '@nocobase/utils/client';
import { App, Button, Popover } from 'antd';
import classnames from 'classnames';
import { default as lodash, isFunction } from 'lodash';
import { default as lodash } from 'lodash';
import React, { useCallback, useEffect, useMemo, useState } from 'react';
import { useTranslation } from 'react-i18next';
import { useActionContext } from '../..';
@ -88,7 +88,7 @@ export const Action: ComposedAction = observer(
});
});
});
}, [JSON.stringify(linkageRules), designable, field]);
}, [field, linkageRules, localVariables, record, variables]);
const handleButtonClick = useCallback(
(e: React.MouseEvent) => {

View File

@ -111,7 +111,7 @@ export const CreateRecordAction = observer(
});
});
});
}, [JSON.stringify(linkageRules)]);
}, [field, linkageRules, localVariables, variables]);
return (
<div className={actionDesignerCss}>
<ActionContextProvider value={{ ...ctx, visible, setVisible }}>
@ -215,7 +215,7 @@ export const CreateAction = observer(
});
});
});
}, [JSON.stringify(linkageRules)]);
}, [field, linkageRules, localVariables, variables]);
return (
<div className={actionDesignerCss}>
<FinallyButton