How to filter data with infinite scroll? First time when page is loaded -> fetching data from the server ( only 16 items ) {limit: 16, offset: 0}
So if i will filter on client side i can filter only 16 items ( but i need whole data )
Is there any ways how to achieve that with infinite scroll?
Here is my function
_loadMore = () => {
this.setState({loadingMore: true});
this.props.getSaloons({limit: 16, offset: this.props.saloons.length});
setTimeout(() => {
this.setState({loadingMore: false});
}, 1000);
};
sql query 'SELECT * FROM stories LIMIT $1 OFFSET $2'
Backend: ExpressJS + PostgreSQL
via Андрей Гузюк
No comments:
Post a Comment