vendredi 3 avril 2020

Datagrid server side filtering/ordering/pagination with multiple REST requests

In the frontend, I have a datagrid to show data from two backend REST APIs. For example, the datagrid shows all the users with their permissions.

Firstly, I will query users API with pageNum and pageSize in the frontend and then query permissions API with the user ids provided by the users API. Finally, merge the data to show in the datagrid. So apparently, there is a dependency on the API query, but so for so good.

Secondly, this datagrid will support server-side filtering/ordering with pagination since there are a large number of users in our system. Front-end filtering/ordering is not acceptable. If users want to do a filter/order on attributes coming from users API, the filter will be transmitted to users API and it works as expected.

But if users want to do a filter/order on attributes coming from permissions API, I have no idea how to make it happen. I appreciate your insight on this, thanks.




Aucun commentaire:

Enregistrer un commentaire