Bootstrap's Pagination In Reactjs - Data Coming From Mongodb
Am trying to make a pagination in reactjs application. Please find the code below. Finally am not able to render the list. Its giving blank list. could someone help me out to figur
Solution 1:
You have missed the return
in your map
function in SearchResultsList
.
this.props.items.sort(
(a, b) => moment(b.order_date) - moment(a.order_date) || b.order_number - a.order_number)
.map((item, index) => {
if (index >= start_offset && start_count < per_page ){
start_count++;
return <SearchResultsItem key={ item.id } item={ item }
open={ this.props.open } />;
}
}
Post a Comment for "Bootstrap's Pagination In Reactjs - Data Coming From Mongodb"