tbleckert / react-select-search

⚡️ Lightweight select component for React
https://react-select-search.com
MIT License
675 stars 149 forks source link

Typescript: missing type function in `emptyMessage` prop in type `SelectSearchProps` #189

Closed marsonparulian closed 3 years ago

marsonparulian commented 3 years ago

Version : 3.0.6

To produce the bug Instead of string, supply emptyMessage (in SelectSearchProps) with a function returning a string. This will make typescript compiler complains about incompatible type.

Based on README.md emptyMessage should accepts parameter a string or a function returning a string.

Solution I will create a PR to add a function in type definition file : emptyMessage? : string|(()=>string)

Thanks.

tbleckert commented 3 years ago

Thanks for the fix and report, included in v3.0.7