Reputation: 83
When I make it empty string, like
noDataText=' '
...it still show an empty rectangle (class=rt-noData). 'False' doesn't help of course.
What would work?
Upvotes: 1
Views: 1257
Reputation: 1408
react-table
allows you to override some internal components so you can replace default NoDataComponent
with the one that renders null
. The component can be overridden either globally or per instance.
Global override:
import { ReactTableDefaults } from 'react-table';
const NullComponent = () => null;
Object.assign(ReactTableDefaults, { NoDataComponent: NullComponent });
Instance override:
const NullComponent = () => null;
<ReactTable
NoDataComponent={NullComponent}
...
/>
Upvotes: 3