react-autocomplete-input icon indicating copy to clipboard operation
react-autocomplete-input copied to clipboard

Allow rendering options with custom component

Open CodyReichert opened this issue 4 years ago • 4 comments

Hey there great library! Are there any plans to allow rendering the items in the options list with custom components? Or would a PR be accepted?

For example:

<ReactAutocompleteInput
  options={["apple", "banana"]}
  renderOption={opt => <Component>{opt}</Component>}
/>

CodyReichert avatar May 18 '20 20:05 CodyReichert

Hi Cody, I am not actively supporting it but I will gladly review and merge good PR

yury-dymov avatar May 18 '20 20:05 yury-dymov

#96 Lil late to the party, but had the same need as OP and created a PR for it. Love the library, hopefully someone else can use my change as well!

imbedhead avatar Mar 15 '23 01:03 imbedhead

@yury-dymov ^

lyleaigbedion avatar Apr 14 '23 21:04 lyleaigbedion

Done, sorry for the wait. Unless I misunderstood code changes, we would have to change 52 constant to dynamic item height evaluation for the option item elements and it would be good to go

yury-dymov avatar Apr 16 '23 18:04 yury-dymov