The basic problem here is that you somehow have to tell React which attribute of the entity to use as content in the dropdown.
I guess for your use case the best solution is to use an additional property of type attribute.
What this gives you is a function that maps from the GUIDs to an attribute value.
You could then use that value in your dropdown.
https://docs.mendix.com/apidocs-mxsdk/apidocs/property-types-pluggable-widgets#attribute
You can use the client API to retrieve the list of objects based on an array of guids
mx.data.get({
guids: [ "123456", "456789" ],
callback: function(objs) {
console.log("Received " + objs.length + " MxObjects");
}
});
Thx, for the idea. Still sounds to me like a quite complex solution for a problem that should be simple. I hoped that it would have become more straightforward. My current solution is to serialize the options to a key-value json array and use that. Guess I’ll stick to that for the time being.