mirror of
https://gitee.com/nocobase/nocobase.git
synced 2025-05-05 05:29:26 +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 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); //传递给上一层
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user