mirror of
https://github.com/nocobase/nocobase
synced 2024-11-15 07:57:20 +00:00
fix: fix loss of data scope field in permission configuration
This commit is contained in:
parent
0adf5fb6b7
commit
a1909d9ce4
@ -8,7 +8,14 @@
|
||||
*/
|
||||
|
||||
import { ISchema } from '@formily/react';
|
||||
import { Filter, FlagProvider, VariableInput, useFilterFieldOptions, useFormBlockContext } from '@nocobase/client';
|
||||
import {
|
||||
Filter,
|
||||
FlagProvider,
|
||||
VariableInput,
|
||||
useFilterFieldOptions,
|
||||
useFormBlockContext,
|
||||
withDynamicSchemaProps,
|
||||
} from '@nocobase/client';
|
||||
import React, { useContext, useEffect } from 'react';
|
||||
import { RoleResourceCollectionContext } from '../RolesResourcesActions';
|
||||
|
||||
@ -146,13 +153,13 @@ export const getScopesSchema = (dataSourceKey) => {
|
||||
title: '{{t("Data scope")}}',
|
||||
name: 'filter',
|
||||
'x-decorator': 'FormItem',
|
||||
'x-component': (props) => {
|
||||
'x-component': withDynamicSchemaProps((props) => {
|
||||
return (
|
||||
<FlagProvider isVariableParsedInOtherContext={true}>
|
||||
<Filter {...props} />
|
||||
</FlagProvider>
|
||||
);
|
||||
},
|
||||
}),
|
||||
'x-use-component-props': () => {
|
||||
// eslint-disable-next-line react-hooks/rules-of-hooks
|
||||
const ctx = useContext(RoleResourceCollectionContext);
|
||||
@ -280,13 +287,13 @@ export const getScopesSchema = (dataSourceKey) => {
|
||||
title: '{{t("Data scope")}}',
|
||||
name: 'filter',
|
||||
'x-decorator': 'FormItem',
|
||||
'x-component': (props) => {
|
||||
'x-component': withDynamicSchemaProps((props) => {
|
||||
return (
|
||||
<FlagProvider isVariableParsedInOtherContext={true}>
|
||||
<Filter {...props} />
|
||||
</FlagProvider>
|
||||
);
|
||||
},
|
||||
}),
|
||||
'x-use-component-props': () => {
|
||||
// eslint-disable-next-line react-hooks/rules-of-hooks
|
||||
const ctx = useContext(RoleResourceCollectionContext);
|
||||
|
Loading…
Reference in New Issue
Block a user