mirror of
https://github.com/HendrikRauh/inventree-app.git
synced 2026-01-13 11:36:24 +00:00
Add custom search context for "category"
This commit is contained in:
parent
36f0d7b120
commit
858464d301
4 changed files with 32 additions and 89 deletions
|
|
@ -3,6 +3,7 @@ import 'package:InvenTree/api.dart';
|
|||
import 'package:InvenTree/inventree/part.dart';
|
||||
import 'package:InvenTree/preferences.dart';
|
||||
import 'package:InvenTree/widget/progress.dart';
|
||||
import 'package:InvenTree/widget/search.dart';
|
||||
|
||||
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
|
||||
|
||||
|
|
@ -44,6 +45,15 @@ class _CategoryDisplayState extends RefreshableState<CategoryDisplayWidget> {
|
|||
icon: FaIcon(FontAwesomeIcons.edit),
|
||||
tooltip: I18N.of(context).edit,
|
||||
onPressed: _editCategoryDialog,
|
||||
),
|
||||
IconButton(
|
||||
icon: FaIcon(FontAwesomeIcons.search),
|
||||
onPressed: () {
|
||||
showSearch(
|
||||
context: context,
|
||||
delegate: PartSearchDelegate(filters: {"category": "${category.pk}"})
|
||||
);
|
||||
}
|
||||
)
|
||||
];
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue