fix: dataSourceKey parameter error for external data sources in acl data scope list (#4882)

This commit is contained in:
Katherine 2024-07-15 14:03:55 +08:00 committed by GitHub
parent 2c578866b9
commit 046bca6dcb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -9,7 +9,7 @@
import { createForm } from '@formily/core';
import React, { createContext, useContext, useMemo, useState } from 'react';
import { FormProvider, SchemaComponent, useRecord } from '@nocobase/client';
import { FormProvider, SchemaComponent, useCollectionRecord, useRecord } from '@nocobase/client';
import { getScopesSchema } from './schemas/scopes';
const RolesResourcesScopesSelectedRowKeysContext = createContext(null);
@ -39,7 +39,7 @@ export const ScopeSelect = (props) => {
[],
);
const { key } = useRecord();
const { key } = useCollectionRecord()?.parentRecord.data || ({} as any);
const scopesSchema = getScopesSchema(key);
return (
<FormProvider form={form}>