fix: graph collection current appInfo error (#2364)
This commit is contained in:
parent
18bf6e507e
commit
07f1f16ea0
@ -375,9 +375,10 @@ export const GraphDrawPage = React.memo(() => {
|
||||
const [collectionData, setCollectionData] = useState<any>([]);
|
||||
const [collectionList, setCollectionList] = useState<any>([]);
|
||||
const { refreshCM } = useCollectionManager();
|
||||
const currentAppInfo = useCurrentAppInfo();
|
||||
const {
|
||||
data: { database },
|
||||
} = useCurrentAppInfo();
|
||||
} = currentAppInfo;
|
||||
const categoryCtx = useContext(CollectionCategroriesContext);
|
||||
const scope = { ...options?.scope };
|
||||
const components = { ...options?.components };
|
||||
@ -506,7 +507,7 @@ export const GraphDrawPage = React.memo(() => {
|
||||
{
|
||||
inherit: 'react-shape',
|
||||
component: (node) => (
|
||||
<CurrentAppInfoContext.Provider value={database}>
|
||||
<CurrentAppInfoContext.Provider value={currentAppInfo}>
|
||||
<APIClientProvider apiClient={api}>
|
||||
<SchemaComponentOptions inherit scope={scope} components={components}>
|
||||
<CollectionCategroriesProvider {...categoryCtx}>
|
||||
|
@ -186,6 +186,7 @@ const PortsCom = React.memo<any>(({ targetGraph, collectionData, setTargetNode,
|
||||
const [collapse, setCollapse] = useState(false);
|
||||
const { t } = useGCMTranslation();
|
||||
const compile = useCompile();
|
||||
const { styles } = useStyles();
|
||||
const {
|
||||
data: { database },
|
||||
} = useCurrentAppInfo();
|
||||
@ -204,9 +205,7 @@ const PortsCom = React.memo<any>(({ targetGraph, collectionData, setTargetNode,
|
||||
return `${prefix || ''}${uid()}`;
|
||||
};
|
||||
const CollectionConten = (data) => {
|
||||
const { styles } = useStyles();
|
||||
const { type, name, primaryKey, allowNull, autoIncrement } = data;
|
||||
|
||||
return (
|
||||
<div className={styles.collectionPopoverClass}>
|
||||
<div className="field-content">
|
||||
|
Loading…
Reference in New Issue
Block a user