renderNoResults isn't working as expected
Issue Type: enhancement
Platform: Native
Description:
I'm using renderNoResults in my ReactiveList component and it's not working as expected. I'm probably not doing using it properly but I didn't see any examples. I've tried:
<ReactiveList
renderNoResults={() => 'hello'}
//and
renderNoResults={() => <Text>helloooo</Text>}
/>
Screenshots:
Minimal reproduction of the problem with instructions:
Reactivesearch version: x.y.z 0.12.0
Browser: ios android
Anything else:
I think we don't support this prop in native.
@bietkul Line 472 in ReactiveList, Native version:
https://github.com/appbaseio/reactivesearch/blob/next/packages/native/src/components/result/ReactiveList.js
renderNoResults = () => {
const type = typeof this.props.onNoResults;
if (type === 'function') {
return this.props.onNoResults();
}
return (
<Text {...getInnerKey(this.props.innerProps, 'noResults')}>
{type === 'string' ? this.props.onNoResults : 'No results found.'}
</Text>
);
};
It's in there. Is it just not active?
It's onNoResults in native.
This works, thank you!!
onNoResults={() => <Text> Custom Message </Text>}