mirror of
https://github.com/HendrikRauh/inventree-app.git
synced 2026-01-14 03:56:24 +00:00
Capture context data in the LocationDisplay widget
This commit is contained in:
parent
5ed13e69aa
commit
3fead77f6d
7 changed files with 42 additions and 56 deletions
|
|
@ -56,7 +56,7 @@ class _CategoryDisplayState extends State<CategoryDisplayWidget> {
|
|||
int pk = category?.pk ?? -1;
|
||||
|
||||
// Request a list of sub-categories under this one
|
||||
InvenTreePartCategory().list(filters: {"parent": "$pk"}).then((var cats) {
|
||||
InvenTreePartCategory().list(context, filters: {"parent": "$pk"}).then((var cats) {
|
||||
_subcategories.clear();
|
||||
|
||||
for (var cat in cats) {
|
||||
|
|
@ -70,7 +70,7 @@ class _CategoryDisplayState extends State<CategoryDisplayWidget> {
|
|||
});
|
||||
|
||||
// Request a list of parts under this category
|
||||
InvenTreePart().list(filters: {"category": "$pk"}).then((var parts) {
|
||||
InvenTreePart().list(context, filters: {"category": "$pk"}).then((var parts) {
|
||||
_parts.clear();
|
||||
|
||||
for (var part in parts) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue