nazirov91 / ra-strapi-rest

React Admin data provider for Strapi.js
125 stars 40 forks source link

Suggestion: Replace Content-Range #22

Closed daugsbi closed 4 years ago

daugsbi commented 4 years ago

Hi @nazirov91 Thanks for creating this plugin and maintaining it.

This is a follow up question on issue #9. Do you have an example with a middleware to implement the content-range behaviour for all routes?

Another option could be to request the total with the count route: strapiAPI/MY-MODEL/count An additional request could be worth it and it shouldn't be too complicated to implement :+1:

What do you think?

nazirov91 commented 4 years ago

Hi @daugsbi,

Thank you for looking into it.

I have noticed some lag on page loads with this implementation. However, it seems to be worth it considering the amount of work you would have to do by overriding each find method for controllers.