inveniosoftware / react-searchkit

React component library for interacting with a REST API.
https://inveniosoftware.github.io/react-searchkit/
MIT License
78 stars 40 forks source link

renderElement function should be a component prop #114

Closed zzacharo closed 4 years ago

zzacharo commented 4 years ago

The renderElement function should be converted to a component prop so as ShouldRender component render it correctly when the condition is true. Otherwise, the function is being evaluated i.e the component that it is returned without the respecting the condition's value.