[feat] pfe-autocomplete | Doesn't work with list of objects, only with strings
It would be great to make this component more flexible to use by allowing it to accept functions for:
-
manipulating how data is displayed in the dropdown (i.e. accept list of objects and for each object, concatenate some values to output string).
-
determine what value to return when an item is selected from the dropdown. [ We don't always want what is displayed in the dropdown to the user to be returned. ]
Hey @maboye - We'll take a look at this and see what we can do. I hope to get back to you real soon.
@maboye - Can we work from this Codesandbox? https://codesandbox.io/embed/compassionate-solomon-cdb48
I've set up a quick example that should help us identify the issue. I think my example demonstrates how to do what you want in the first bullet point. For the second bullet point, I think we need to make a code change to identify the index of the object in the array.
Is this still relevant with @patternfly/pfe-autocomplete@^2.0.0-next.0?