mirror of
https://gitee.com/nocobase/nocobase.git
synced 2025-05-05 05:29:26 +08:00
feat: add deletePopupContext function to manage popup context storage (#6411)
This commit is contained in:
parent
5ade85acd4
commit
d90c17b3a4
@ -72,6 +72,10 @@ export const storePopupContext = (popupUid: string, params: PopupContextStorage)
|
||||
popupsContextStorage[popupUid] = params;
|
||||
};
|
||||
|
||||
export const deletePopupContext = (popupUid: string) => {
|
||||
delete popupsContextStorage[popupUid];
|
||||
};
|
||||
|
||||
const blockServicesStorage: Record<string, { service: any }> = {};
|
||||
|
||||
export const getBlockService = (popupUid: string) => {
|
||||
@ -300,7 +304,15 @@ export const usePopupUtils = (
|
||||
|
||||
navigate(withSearchParams(removeLastPopupPath(location.pathname)), { replace: true });
|
||||
removePopupLayerState(currentLevel);
|
||||
}, [isPopupVisibleControlledByURL, setVisibleFromAction, navigate, location?.pathname, currentLevel]);
|
||||
popupParams?.popupuid && deletePopupContext(popupParams.popupuid);
|
||||
}, [
|
||||
isPopupVisibleControlledByURL,
|
||||
setVisibleFromAction,
|
||||
navigate,
|
||||
location?.pathname,
|
||||
currentLevel,
|
||||
popupParams?.popupuid,
|
||||
]);
|
||||
|
||||
const changeTab = useCallback(
|
||||
(key: string) => {
|
||||
|
Loading…
x
Reference in New Issue
Block a user