mirror of
https://github.com/stashapp/stash.git
synced 2025-12-18 04:44:37 +03:00
Filter query (#3740)
* Add search field to filter dialog * Add / shortcut to focus query * Fix f keybind typing f into query field * Document keyboard shortcut
This commit is contained in:
@@ -193,7 +193,13 @@ export function makeItemList<T extends QueryResult, E extends IDataItem>({
|
||||
|
||||
// set up hotkeys
|
||||
useEffect(() => {
|
||||
Mousetrap.bind("f", () => setShowEditFilter(true));
|
||||
Mousetrap.bind("f", (e) => {
|
||||
setShowEditFilter(true);
|
||||
// prevent default behavior of typing f in a text field
|
||||
// otherwise the filter dialog closes, the query field is focused and
|
||||
// f is typed.
|
||||
e.preventDefault();
|
||||
});
|
||||
|
||||
return () => {
|
||||
Mousetrap.unbind("f");
|
||||
|
||||
Reference in New Issue
Block a user