[ADF-2131] Search sorting (#3334)

* sorting configuration

* detect primary sorting and use with document list

* search results sorting

* docs update

* unit tests and code updates

* update code

* update code

* generic sorting picker, test updates

* ability to switch off client side sorting

* update docs for document list
This commit is contained in:
Denys Vuika
2018-05-18 14:33:28 +01:00
committed by Eugenio Romano
parent 73bc62ae8f
commit 07440731fa
29 changed files with 682 additions and 35 deletions

View File

@@ -599,6 +599,46 @@
}
}
}
},
"sorting": {
"description": "Sorting options and defaults",
"required": ["options"],
"properties": {
"options": {
"type": "array",
"minItems": 1,
"items": {
"description": "Sorting options available for users to choose from",
"type": "object",
"required": ["key", "label", "type", "field", "ascending"],
"properties": {
"key": { "type": "string" },
"label": { "type": "string" },
"type": { "type": "string" },
"field": { "type": "string" },
"ascending": { "type": "boolean" }
}
}
},
"defaults": {
"description": "Predefined sorting to execute by default",
"options": {
"type": "array",
"minItems": 1,
"items": {
"type": "object",
"required": ["key", "label", "type", "field", "ascending"],
"properties": {
"key": { "type": "string" },
"label": { "type": "string" },
"type": { "type": "string" },
"field": { "type": "string" },
"ascending": { "type": "boolean" }
}
}
}
}
}
}
}
}