Open slint opened 4 years ago
@slint doing something like this doesn't work?
renderListItem = (result, index) => <MyCustomComponent result={result} index={index} />
For the renderElement
prop I created an issue https://github.com/inveniosoftware/react-searchkit/issues/114 that give's another reason on why should be rendered as a component.
I think this doesn't apply anymore and can be closed.
props.renderElement should render a component in the following fashion:
This would allow e.g. for custom components with their own internal state to be passed.
The concrete use-case is that we have a search page where each list item has
Accept/Reject
buttons, that when clicked make an AJAX HTTP request and on a successful response they show a result message and disable the buttons: