I'm trying to create a custom-field that is an entity-single-select for customers, exactly like the one in the sw-order module as seen here sw-order-create-details-header > sw-entity-single-select
Is there some way for me, to configure the look of my custom-field to be the same as the extended select-field in the sw-order module? With that i mean, inclusive of firstName, lastName, address and customernumber? (Without creating a a new component)
What i have so far is this:
protected $customFields = [
[
'name' => 'referrer_set',
'config' => [
'label' => [
'en-GB' => 'Referrer',
'de-DE' => 'Referrer',
],
],
'customFields' => [
[
'active' => true,
'name' => 'refferer_set',
'type' => CustomFieldTypes::ENTITY,
'config' => [
'componentName' => 'sw-entity-single-select',
'entity' => CustomerDefinition::ENTITY_NAME,
'placeholder' => "Wurde empfohlen von ...",
'highlightSearchTerm' => true,
'allowEntityCreation' => false,
'show-clearable-button' => true,
'labelProperty' => 'firstName',
'label' => [
'en-GB' => 'Empfohlen von',
'de-DE' => 'Empfohlen von',
],
],
],
],
'relations' => [
[
'entityName' => CustomerDefinition::ENTITY_NAME,
],
],
],
];