react-autocomplete
react-autocomplete copied to clipboard
getItemValue() vs renderItem()
getItemValue()
and renderItem()
seem redundant. Both are used to return what is displayed for each item. Why are they both necessary?
From what I can tell, renderItem
returns layout/view for the autocomplete list. getItemValue
returns what gets passed to onSelect
.
getItemValue
is also used to filter the autocomplete list. This is actually causing problems for me because I want to filter on label but return an id.