How can I sort a nested restheart data column?

205 Views Asked by At

I have a table with several columns which I need to be sorted. I'm using RestHeart Api and this is what I am feeding the column with:

{
    "type": "text",
    "size": "sm",
    "id": "labelEstado",
    "pathToValue": "estados___[key=='status']",
    "text": "estado",
    "icon": {
        "cancelled": "glyphicon glyphicon-ban-circle fx-status-success",
        "ok": "glyphicon glyphicon-ok fx-status-success",
    },
    "filter": true,
    "sort": true
}

Something seems to be confusing the sorting process as the request is always passing the id in the GET request instead of "status" that is a "nested field" inside "estado"...

I tried

"sort": "status"

and

"sort": "estados.status"

but the GET request isn't filled properly (keeps ending in &sort_by=labelEstado) and no filter button over the column shows up.

How can I get the filter option to allow the filter button to show up but filter by "status" value?

0

There are 0 best solutions below