I am using the <sw-entity-single-select
tag, but the items inside are empty. The amount of items are correct, and the console.log data on change also gives correct data. Maybe i'm missing an attribute or something?
This is the tag
<sw-entity-single-select
v-model="component.dimensionType"
entity="dimension"
:localMode="component.isNew()"
label="Koppel dimensie aan component"
@change="setDimension"
>
</sw-entity-single-select>
And this is the entity definition of dimension
return new FieldCollection(
[
(new IdField('id', 'id'))->addFlags(new Required(), new PrimaryKey()),
(new StringField('title', 'title'))->addFlags(new Required()),
(new OneToManyAssociationField(
'components',
ComponentDefinition::class,
'dimension_type',
'id'))->addFlags(new RestrictDelete(), new ReverseInherited('dimensionType')
),
]
);
And the relation the other way around in component
new FkField('dimension_type', 'dimensionType', DimensionDefinition::class),
new ManyToOneAssociationField(
'dimension',
'dimension_type',
DimensionDefinition::class
),