Fix input relation

This commit is contained in:
Jim Laurie 2018-05-06 20:34:33 +02:00
parent d05f8146a5
commit 38fc1aade7

View File

@ -32,7 +32,7 @@ function EditRelations(props) {
{map(filterRelationsUpload(props.schema.relations), (relation, key) => { {map(filterRelationsUpload(props.schema.relations), (relation, key) => {
if (relation.nature.toLowerCase().includes('morph') && relation[key]) return ''; if (relation.nature.toLowerCase().includes('morph') && relation[key]) return '';
const Select = ['oneWay', 'oneToOne', 'manyToOne', 'oneToManyMorph', 'oneToOneMorph'].includes(relation.nature) && relation.dominant ? SelectOne : SelectMany; const Select = ['oneWay', 'oneToOne', 'manyToOne', 'oneToManyMorph', 'oneToOneMorph'].includes(relation.nature) ? SelectOne : SelectMany;
return ( return (
<Select <Select