BUG: Selectbox editor with Entity-DataSource and set to multiple selection does not show selected entities #2771
Closed
Description
Description
It is possible to receive entities via a DataSource and to select them in a SelectBox Editor. The selected entity is then saved to the property and the object is automatically dehydrated when the property is accessed.
That works fine when the inspector element is set to single-selection.
When the selector is configured with multiple: true
, meant to save an array of references:
- Selecting multiple entities work
- The selection is successfully written to the database
- After reload the selection is loaded from the database and passed as an array to the UI
-> The entities are not displayed as selected in the multi-selectobox
Steps to Reproduce
- Configure references to an entity:
user:
type: array<Neos\Neos\Domain\Model\User>
ui:
label: Users
reloadIfChanged: true
inspector:
group: file
editor: Neos.Neos/Inspector/Editors/SelectBoxEditor
editorOptions:
placeholder: i18n
dataSourceIdentifier: user-data-source
multiple: true
- Configure a data type
Neos:
Neos:
userInterface:
inspector:
dataTypes:
'array<Neos\Neos\Domain\Model\User>':
typeConverter: Neos\Flow\Property\TypeConverter\TypedArrayConverter
editor: 'Neos.Neos/Inspector/Editors/SelectBoxEditor'
editorOptions:
dataSourceIdentifier: 'user-data-source'
- Add a datasource
Expected behavior
After selecting users and saving the data, the selection is shown.
Actual behavior
After reload the selector stays empty
Affected Versions
Neos: latest
UI: latest