mirror of
https://gitee.com/nocobase/nocobase.git
synced 2025-07-02 03:02:19 +08:00
fix: configure data scope in action permission reporting error (#4301)
This commit is contained in:
parent
3c8c5813de
commit
8afe119ac9
@ -22,13 +22,12 @@ export const ActionContextProvider: React.FC<ActionContextProps & { value?: Acti
|
|||||||
const isFirstRender = useRef(true); // 使用ref跟踪是否为首次渲染
|
const isFirstRender = useRef(true); // 使用ref跟踪是否为首次渲染
|
||||||
const service = useDataBlockRequest();
|
const service = useDataBlockRequest();
|
||||||
const { setSubmitted: setParentSubmitted } = { ...props, ...props.value, ...contextProps };
|
const { setSubmitted: setParentSubmitted } = { ...props, ...props.value, ...contextProps };
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (visible !== undefined) {
|
if (visible !== undefined) {
|
||||||
if (isFirstRender.current) {
|
if (isFirstRender.current) {
|
||||||
isFirstRender.current = false;
|
isFirstRender.current = false;
|
||||||
} else {
|
} else {
|
||||||
if (visible === false && submitted) {
|
if (visible === false && submitted && service) {
|
||||||
service.refresh();
|
service.refresh();
|
||||||
setParentSubmitted?.(true); //传递给上一层
|
setParentSubmitted?.(true); //传递给上一层
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user