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:
@ -1,5 +1,4 @@
|
||||
import "package:flutter/material.dart";
|
||||
import "package:font_awesome_flutter/font_awesome_flutter.dart";
|
||||
|
||||
import "package:inventree/api.dart";
|
||||
import "package:inventree/l10.dart";
|
||||
@ -31,23 +30,9 @@ class _SupplierPartListState extends RefreshableState<SupplierPartList> {
|
||||
@override
|
||||
String getAppBarTitle() => L10().supplierParts;
|
||||
|
||||
bool showFilterOptions = false;
|
||||
|
||||
@override
|
||||
List<Widget> appBarActions(BuildContext context) => [
|
||||
IconButton(
|
||||
icon: FaIcon(FontAwesomeIcons.filter),
|
||||
onPressed: () async {
|
||||
setState(() {
|
||||
showFilterOptions = !showFilterOptions;
|
||||
});
|
||||
},
|
||||
)
|
||||
];
|
||||
|
||||
@override
|
||||
Widget getBody(BuildContext context) {
|
||||
return PaginatedSupplierPartList(widget.filters, showFilterOptions);
|
||||
Widget getBody(BuildContext context) {
|
||||
return PaginatedSupplierPartList(widget.filters);
|
||||
}
|
||||
|
||||
}
|
||||
@ -55,7 +40,10 @@ class _SupplierPartListState extends RefreshableState<SupplierPartList> {
|
||||
|
||||
class PaginatedSupplierPartList extends PaginatedSearchWidget {
|
||||
|
||||
const PaginatedSupplierPartList(Map<String, String> filters, bool showSearch) : super(filters: filters, showSearch: showSearch);
|
||||
const PaginatedSupplierPartList(Map<String, String> filters) : super(filters: filters);
|
||||
|
||||
@override
|
||||
String get searchTitle => L10().supplierParts;
|
||||
|
||||
@override
|
||||
_PaginatedSupplierPartListState createState() => _PaginatedSupplierPartListState();
|
||||
|
Reference in New Issue
Block a user