Enable sorting in tab of users' media (#138)

This commit is contained in:
Manuel Stahl
2021-05-04 16:18:12 +02:00
parent 57c41cc069
commit 41ce58bac8
3 changed files with 11 additions and 9 deletions

View File

@@ -314,10 +314,13 @@ const dataProvider = {
getManyReference: (resource, params) => {
console.log("getManyReference " + resource);
const { page, perPage } = params.pagination;
const { field, order } = params.sort;
const from = (page - 1) * perPage;
const query = {
from: from,
limit: perPage,
order_by: field,
dir: getSearchOrder(order),
};
const homeserver = localStorage.getItem("base_url");