imballinst / react-bs-datatable

Bootstrap datatable without jQuery. Features include: filter, sort, pagination, checkbox, and control customization.
https://imballinst.github.io/react-bs-datatable
MIT License
59 stars 20 forks source link

Make it lazy load pagination for huge data? #1

Closed ans-4175 closed 5 years ago

ans-4175 commented 7 years ago
imballinst commented 7 years ago

It was my mistake I didn't think about huge amount of data when I first developed it. Probably I will implement them both, according to (http://uxmovement.com/navigation/avoid-the-pains-of-pagination/) that sometimes, when the number of pages is too big, it's not necessary to show the current page number because it doesn't encourage the user to view until the last page. However, if the number of pages is considered small (probably around less than 20), it is still accepted to show the current page number.

As for the data request, I feel like it's way better to separate the functions that send HTTP request from this component (ie. using Redux, for separation of concerns), so that these functions are passed as props to this component.

Thanks for the idea! I will probably implement it one or two versions after this one.

imballinst commented 5 years ago

Fixed with https://github.com/Imballinst/react-bs-datatable/pull/40.