fix: configure data scope in action permission reporting error (#4301)

This commit is contained in:
katherinehhh 2024-05-09 13:57:57 +08:00 committed by GitHub
parent 3c8c5813de
commit 8afe119ac9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -22,13 +22,12 @@ export const ActionContextProvider: React.FC<ActionContextProps & { value?: Acti
const isFirstRender = useRef(true); // 使用ref跟踪是否为首次渲染
const service = useDataBlockRequest();
const { setSubmitted: setParentSubmitted } = { ...props, ...props.value, ...contextProps };
useEffect(() => {
if (visible !== undefined) {
if (isFirstRender.current) {
isFirstRender.current = false;
} else {
if (visible === false && submitted) {
if (visible === false && submitted && service) {
service.refresh();
setParentSubmitted?.(true); //传递给上一层
}