mirror of
https://github.com/HendrikRauh/inventree-app.git
synced 2026-01-13 11:36:24 +00:00
Adds search results
This commit is contained in:
parent
9cf8559569
commit
d1e612698e
4 changed files with 198 additions and 48 deletions
|
|
@ -84,21 +84,15 @@ class InvenTreeModel {
|
|||
// Return the API detail endpoint for this Model object
|
||||
String get url => "${URL}/${pk}/";
|
||||
|
||||
/*
|
||||
|
||||
// Search this Model type in the database
|
||||
Future<List<InvenTreeModel>> search(String searchTerm) async {
|
||||
Future<List<InvenTreeModel>> search(BuildContext context, String searchTerm) async {
|
||||
|
||||
String addr = url + "?search=" + search;
|
||||
final results = list(context, filters: {"cascade": "true", "search": searchTerm});
|
||||
|
||||
print("Searching endpoint: $url");
|
||||
|
||||
// TODO - Add "timeout"
|
||||
// TODO - Add error catching
|
||||
|
||||
var response =
|
||||
return results;
|
||||
|
||||
}
|
||||
*/
|
||||
|
||||
Map<String, String> defaultListFilters() { return Map<String, String>(); }
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue