mirror of
https://github.com/inventree/inventree-app.git
synced 2025-06-15 11:45:31 +00:00
Search improvements (#388)
* Refactor search widget - visual improvements - Simplifications - Add refresh button - Improve search button * Track original search * fix BOM widget * Update release notes
This commit is contained in:
@ -31,23 +31,9 @@ class _PurchaseOrderListWidgetState extends RefreshableState<PurchaseOrderListWi
|
||||
|
||||
final Map<String, String> filters;
|
||||
|
||||
bool showFilterOptions = false;
|
||||
|
||||
@override
|
||||
String getAppBarTitle() => L10().purchaseOrders;
|
||||
|
||||
@override
|
||||
List<Widget> appBarActions(BuildContext context) => [
|
||||
IconButton(
|
||||
icon: FaIcon(FontAwesomeIcons.filter),
|
||||
onPressed: () async {
|
||||
setState(() {
|
||||
showFilterOptions = !showFilterOptions;
|
||||
});
|
||||
},
|
||||
)
|
||||
];
|
||||
|
||||
@override
|
||||
List<SpeedDialChild> actionButtons(BuildContext context) {
|
||||
List<SpeedDialChild> actions = [];
|
||||
@ -95,14 +81,17 @@ class _PurchaseOrderListWidgetState extends RefreshableState<PurchaseOrderListWi
|
||||
|
||||
@override
|
||||
Widget getBody(BuildContext context) {
|
||||
return PaginatedPurchaseOrderList(filters, showFilterOptions);
|
||||
return PaginatedPurchaseOrderList(filters);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
class PaginatedPurchaseOrderList extends PaginatedSearchWidget {
|
||||
|
||||
const PaginatedPurchaseOrderList(Map<String, String> filters, bool showSearch) : super(filters: filters, showSearch: showSearch);
|
||||
const PaginatedPurchaseOrderList(Map<String, String> filters) : super(filters: filters);
|
||||
|
||||
@override
|
||||
String get searchTitle => L10().purchaseOrders;
|
||||
|
||||
@override
|
||||
_PaginatedPurchaseOrderListState createState() => _PaginatedPurchaseOrderListState();
|
||||
|
Reference in New Issue
Block a user