reactjs / react-autocomplete

WAI-ARIA compliant React autocomplete (combobox) component

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

getItemValue() vs renderItem()

mellis481 opened this issue · comments

getItemValue() and renderItem() seem redundant. Both are used to return what is displayed for each item. Why are they both necessary?

commented

From what I can tell, renderItem returns layout/view for the autocomplete list. getItemValue returns what gets passed to onSelect.

commented

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.