When I create the table extra rows seem to be created, yet I only have 4 records in my global variable.
data = DATA.bookings.map( function(items) {
if( items.status != 'pending' ) {
return items;
}
});
//get columns
columns = [
{
header: 'Name',
accessor: 'driver.firstName',
},
{
header: 'Pick-up Date/Time',
accessor: 'pickUp.dateTime',
},
{
header: 'From',
accessor: 'from.location',
},
{
header: 'To',
accessor: 'to.location',
},
{
header: 'Status',
accessor: 'status'
}
];
//set table config options
//https://github.com/tannerlinsley/react-table#props
options = {
showPageSizeOptions: false,
showPageJump: false,
showPagination: false
}
return {
data: data,
columns: columns,
options: options
}
}`
This is one of me methods that I pass to create the table. I've also attached an image