fix: add new collection linakge disabled (#2198)
This commit is contained in:
parent
f567f887de
commit
5a8f3d1ae3
@ -1,7 +1,7 @@
|
|||||||
import { useMemo } from 'react';
|
import { useMemo } from 'react';
|
||||||
|
import { useTranslation } from 'react-i18next';
|
||||||
import { useCompile, useGetFilterOptions } from '../../../schema-component';
|
import { useCompile, useGetFilterOptions } from '../../../schema-component';
|
||||||
import { FieldOption, Option } from '../type';
|
import { FieldOption, Option } from '../type';
|
||||||
import { useTranslation } from 'react-i18next';
|
|
||||||
|
|
||||||
interface GetOptionsParams {
|
interface GetOptionsParams {
|
||||||
depth: number;
|
depth: number;
|
||||||
@ -27,7 +27,7 @@ const getChildren = (
|
|||||||
label: compile(option.title),
|
label: compile(option.title),
|
||||||
depth,
|
depth,
|
||||||
// TODO: 现在是通过组件的名称来过滤能够被选择的选项,这样的坏处是不够精确,后续可以优化
|
// TODO: 现在是通过组件的名称来过滤能够被选择的选项,这样的坏处是不够精确,后续可以优化
|
||||||
disabled: schema?.['x-component'] !== option.schema?.['x-component'],
|
disabled: schema && schema?.['x-component'] !== option.schema?.['x-component'],
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user