How can I select a default/initial option when the options are an array of objects? If I provide the id as a defaultValue, the Typeahead field will render the id as text, but what I want to appear is the object's name as specified in "displayOption". I can't provide the name as a default value because it's possible that two unique objects with different IDs share the same name, and of course typeahead doesn't know which object I meant.
If I provide an array of objects to Typeahead, like this:
How can I select a default/initial option when the options are an array of objects? If I provide the id as a defaultValue, the Typeahead field will render the id as text, but what I want to appear is the object's name as specified in "displayOption". I can't provide the name as a default value because it's possible that two unique objects with different IDs share the same name, and of course typeahead doesn't know which object I meant.
This is for a form to edit an existing entity where the user may not want to change their previous selection for this field.