yang icon indicating copy to clipboard operation
yang copied to clipboard

Set sort order

Open Rudloff opened this issue 3 months ago • 1 comments

The documentation does not say how to set sort order (ascending or descending). I tried something like this but it does not work:

    ->setJsonApiSort([
      'install' => [
        'path' => 'field_active_installs_total',
        'direction' => 'DESC',
      ],
    ])

Rudloff avatar Nov 28 '25 12:11 Rudloff

My bad, I just saw in the specification that prepending - reverses the order:

    ->setJsonApiSort(['-field_active_installs_total'])

Maybe this could be mentioned in the documentation?

Rudloff avatar Nov 28 '25 12:11 Rudloff