delete table type options for all other tags (not table)

This commit is contained in:
alex-krasn 2020-10-06 14:03:42 -07:00
Родитель d2ec33e14f
Коммит 205da423ba
1 изменённых файлов: 3 добавлений и 2 удалений

Просмотреть файл

@ -755,13 +755,14 @@ export class TagInput extends React.Component<ITagInputProps, ITagInputState> {
// here
private getTypeSubMenuItems = (): IContextualMenuItem[] => {
const tag = this.state.selectedTag;
const types = Object.values(FieldType);
let types = Object.values(FieldType);
if (tag.type === FieldType.Table) {
return []
} else {
types = types.filter((i) => i !== FieldType.Table)
}
return types.map((type) => {
const isCompatible = this.isTypeCompatibleWithTag(tag, type);
return {
key: type,
text: type,