Skip to content
Snippets Groups Projects
Commit ceab432a authored by Konrad Mohrfeldt's avatar Konrad Mohrfeldt :koala:
Browse files

feat: add OrderFilter component

This component implements the logic for the standard
django-rest-framework (DRF) order parameter.

DRF uses plan field names for ascending and a "-" prefix for descending
order.

Example:
	if you’d want to sort by id you’d write:
		?order=id
	if you’d want to sort by id in reverse order you’d write:
		?order=-id

The OrderFilter supports arbitrary order fields, allows you to set the
sort direction (ascending, descending – configurable per order field)
and supports re-ordering of order fields so that that hierarchical
orders can be set.
parent b738b19d
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment