2
0
mirror of https://github.com/inventree/inventree-app.git synced 2026-01-22 18:59:43 +00:00

Default filters (#755)

* Bug fix for filters

- Fix key shadowing

* Adjust default filters for stock list

* Adjust default filter values

* Add "active" filter for stock items

* Code formatting

* Add "default ordering" option

* Enable pathstring sorting

* dart format
This commit is contained in:
Oliver
2026-01-20 09:11:40 +11:00
committed by GitHub
parent 74f468dc1b
commit 97e4c98e46
4 changed files with 33 additions and 13 deletions

View File

@@ -61,9 +61,16 @@ class _PaginatedPartCategoryListState
},
};
@override
String get defaultOrdering => "pathstring";
@override
Map<String, String> get orderingOptions {
Map<String, String> options = {"name": L10().name, "level": L10().level};
Map<String, String> options = {
"name": L10().name,
"pathstring": L10().path,
"level": L10().level,
};
// Note: API v69 changed 'parts' to 'part_count'
if (InvenTreeAPI().apiVersion >= 69) {