mirror of
https://github.com/inventree/inventree-app.git
synced 2025-05-05 00:38:54 +00:00
Close expander items if there are no children!
This commit is contained in:
parent
b4c540433f
commit
5652926a38
@ -169,7 +169,7 @@ class _CategoryDisplayState extends State<CategoryDisplayWidget> {
|
|||||||
);
|
);
|
||||||
},
|
},
|
||||||
body: SubcategoryList(_subcategories),
|
body: SubcategoryList(_subcategories),
|
||||||
isExpanded: _subcategoriesExpanded,
|
isExpanded: _subcategoriesExpanded && _subcategories.length > 0,
|
||||||
),
|
),
|
||||||
ExpansionPanel(
|
ExpansionPanel(
|
||||||
headerBuilder: (BuildContext context, bool isExpanded) {
|
headerBuilder: (BuildContext context, bool isExpanded) {
|
||||||
@ -185,7 +185,7 @@ class _CategoryDisplayState extends State<CategoryDisplayWidget> {
|
|||||||
);
|
);
|
||||||
},
|
},
|
||||||
body: PartList(_parts),
|
body: PartList(_parts),
|
||||||
isExpanded: _partListExpanded,
|
isExpanded: _partListExpanded && _parts.length > 0,
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
@ -176,7 +176,7 @@ class _LocationDisplayState extends State<LocationDisplayWidget> {
|
|||||||
);
|
);
|
||||||
},
|
},
|
||||||
body: SublocationList(_sublocations),
|
body: SublocationList(_sublocations),
|
||||||
isExpanded: _locationListExpanded,
|
isExpanded: _locationListExpanded && _sublocations.length > 0,
|
||||||
),
|
),
|
||||||
ExpansionPanel(
|
ExpansionPanel(
|
||||||
headerBuilder: (BuildContext context, bool isExpanded) {
|
headerBuilder: (BuildContext context, bool isExpanded) {
|
||||||
@ -192,7 +192,7 @@ class _LocationDisplayState extends State<LocationDisplayWidget> {
|
|||||||
);
|
);
|
||||||
},
|
},
|
||||||
body: StockList(_items),
|
body: StockList(_items),
|
||||||
isExpanded: _stockListExpanded,
|
isExpanded: _stockListExpanded && _items.length > 0,
|
||||||
)
|
)
|
||||||
]
|
]
|
||||||
),
|
),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user