mirror of
https://github.com/HendrikRauh/inventree-app.git
synced 2026-01-13 03:26:24 +00:00
Fixed "await" for refreshable states
- Progress indicator stays in place until calls are completed
This commit is contained in:
parent
0cfac69d16
commit
12f4a4fa38
4 changed files with 18 additions and 21 deletions
|
|
@ -62,7 +62,7 @@ class _CategoryDisplayState extends RefreshableState<CategoryDisplayWidget> {
|
|||
int pk = category?.pk ?? -1;
|
||||
|
||||
// Request a list of sub-categories under this one
|
||||
InvenTreePartCategory().list(context, filters: {"parent": "$pk"}).then((var cats) {
|
||||
await InvenTreePartCategory().list(context, filters: {"parent": "$pk"}).then((var cats) {
|
||||
_subcategories.clear();
|
||||
|
||||
for (var cat in cats) {
|
||||
|
|
@ -76,7 +76,7 @@ class _CategoryDisplayState extends RefreshableState<CategoryDisplayWidget> {
|
|||
});
|
||||
|
||||
// Request a list of parts under this category
|
||||
InvenTreePart().list(context, filters: {"category": "$pk"}).then((var parts) {
|
||||
await 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