alsoscotland / react-super-select

MIT License
95 stars 33 forks source link

Is there any possibility of leaving the super-select field noResultsString as template? #119

Closed eduardobarbiero closed 7 years ago

eduardobarbiero commented 7 years ago

In some specific cases we use a template for perform some action when there are no items in that select list. Example:

noResultsTemplate={ () => <TemplateForNoItens /> }

If there is any interest on the part of the master of the component, I can assist in the development.

alsoscotland commented 7 years ago

@eduardobarbiero That would be great. I would be happy to accept a pull for that

alsoscotland commented 7 years ago

@eduardobarbiero Let me know if this would work for you. I just overloaded the prop type for noResultsString to allow for React Elements as well. https://github.com/alsoscotland/react-super-select/pull/124

eduardobarbiero commented 7 years ago

@alsoscotland exactly!

alsoscotland commented 7 years ago

@eduardobarbiero Done https://github.com/alsoscotland/react-super-select/tree/v1.0.7