fix(Safari): resolve issue with menu page not refreshing in Safari (#4835)

* fix(Safari): resolve issue with menu page not refreshing in Safari

* chore: correct problematic code
This commit is contained in:
Zeke Zhang 2024-07-11 12:27:41 +08:00 committed by GitHub
parent a7a0c41d30
commit 1a6be31356
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 4 deletions

View File

@ -35,9 +35,9 @@ import {
} from '../../../';
import { Plugin } from '../../../application/Plugin';
import { useAppSpin } from '../../../application/hooks/useAppSpin';
import { useMenuTranslation } from '../../../schema-component/antd/menu/locale';
import { Help } from '../../../user/Help';
import { VariablesProvider } from '../../../variables';
import { useMenuTranslation } from '../../../schema-component/antd/menu/locale';
const filterByACL = (schema, options) => {
const { allowAll, allowMenuItemIds = [] } = options;
@ -218,7 +218,6 @@ const MenuEditor = (props) => {
<SchemaIdContext.Provider value={defaultSelectedUid}>
<SchemaComponent
distributed
memoized
scope={{ useMenuProps, onSelect, sideMenuRef, defaultSelectedUid }}
schema={schema}
/>

View File

@ -62,10 +62,10 @@ const RequestSchemaComponent: React.FC<RemoteSchemaComponentProps> = (props) =>
return <Spin />;
}
return noForm ? (
<SchemaComponent memoized components={components} scope={scope} schema={schemaTransform(data?.data || {})} />
<SchemaComponent components={components} scope={scope} schema={schemaTransform(data?.data || {})} />
) : (
<FormProvider form={form}>
<SchemaComponent memoized components={components} scope={scope} schema={schemaTransform(data?.data || {})} />
<SchemaComponent components={components} scope={scope} schema={schemaTransform(data?.data || {})} />
</FormProvider>
);
};