refresh schema
This commit is contained in:
parent
ab81afecfa
commit
57cc9e6081
@ -107,16 +107,17 @@ function LayoutWithMenu(props: LayoutWithMenuProps) {
|
||||
}
|
||||
|
||||
function Content({ activeKey }) {
|
||||
const { loading: collectionsLoading } = useCollectionsContext();
|
||||
const { data = {}, loading } = useRequest(
|
||||
const { designable } = useDesignableSwitchContext();
|
||||
const { collections } = useCollectionsContext();
|
||||
const { data = {}, loading, run } = useRequest(
|
||||
`ui_schemas:getTree?filter[parentKey]=${activeKey}`,
|
||||
{
|
||||
refreshDeps: [activeKey],
|
||||
refreshDeps: [activeKey, collections, designable],
|
||||
formatResult: (result) => result?.data,
|
||||
},
|
||||
);
|
||||
|
||||
if (loading || collectionsLoading) {
|
||||
if (loading) {
|
||||
return <Spin />;
|
||||
}
|
||||
|
||||
|
@ -512,7 +512,7 @@ AddNew.CardItem = observer((props: any) => {
|
||||
key={view.key}
|
||||
title={view.title}
|
||||
>
|
||||
<Menu.ItemGroup key={`${view.key}-select`} title={'所属数据表'}>
|
||||
<Menu.ItemGroup className={'display-fields'} key={`${view.key}-select`} title={'所属数据表'}>
|
||||
{collections?.map((item) => (
|
||||
<Menu.Item
|
||||
style={{ minWidth: 150 }}
|
||||
|
Loading…
Reference in New Issue
Block a user