mirror of
https://github.com/Kong/insomnia.git
synced 2026-10-28 01:29:28 -04:00
remove document filter global shortcut (#5269)
This commit is contained in:
1 parent
09cf77c4ef
commit
130796ba9b
3 files changed
+3
-15
No files matched your search
@@ -55,8 +55,7 @@ export type KeyboardShortcut =
|
||||
| 'request_togglePin'
|
||||
| 'environment_showVariableSourceAndValue'
|
||||
| 'beautifyRequestBody'
|
||||
| 'graphql_explorer_focus_filter'
|
||||
| 'documents_filter';
|
||||
| 'graphql_explorer_focus_filter';
|
||||
|
||||
/**
|
||||
* The collection of defined hotkeys.
|
||||
|
||||
@@ -39,7 +39,6 @@ export const keyboardShortcutDescriptions: Record<KeyboardShortcut, string> = {
|
||||
'environment_showVariableSourceAndValue': 'Show variable source and value',
|
||||
'beautifyRequestBody': 'Beautify Active Code Editors',
|
||||
'graphql_explorer_focus_filter': 'Focus GraphQL Explorer Filter',
|
||||
'documents_filter': 'Focus Documents Filter',
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -176,10 +175,6 @@ const defaultRegistry: HotKeyRegistry = {
|
||||
macKeys: [{ shift: true, meta: true, keyCode: keyboardKeys.i.keyCode }],
|
||||
winLinuxKeys: [{ ctrl: true, shift: true, keyCode: keyboardKeys.i.keyCode }],
|
||||
},
|
||||
documents_filter: {
|
||||
macKeys: [{ meta: true, keyCode: keyboardKeys.f.keyCode }],
|
||||
winLinuxKeys: [{ ctrl: true, keyCode: keyboardKeys.f.keyCode }],
|
||||
},
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import 'swagger-ui-react/swagger-ui.css';
|
||||
|
||||
import React, { FC, useCallback, useRef, useState } from 'react';
|
||||
import React, { FC, useCallback, useState } from 'react';
|
||||
import { useDispatch, useSelector } from 'react-redux';
|
||||
import styled from 'styled-components';
|
||||
import { unreachableCase } from 'ts-assert-unreachable';
|
||||
@@ -32,7 +32,6 @@ import { DropdownItem } from './base/dropdown/dropdown-item';
|
||||
import { DashboardSortDropdown } from './dropdowns/dashboard-sort-dropdown';
|
||||
import { ProjectDropdown } from './dropdowns/project-dropdown';
|
||||
import { RemoteWorkspacesDropdown } from './dropdowns/remote-workspaces-dropdown';
|
||||
import { useDocBodyKeyboardShortcuts } from './keydown-binder';
|
||||
import { showPrompt } from './modals';
|
||||
import { PageLayout } from './page-layout';
|
||||
import { WrapperHomeEmptyStatePane } from './panes/wrapper-home-empty-state-pane';
|
||||
@@ -190,7 +189,6 @@ const WrapperHome: FC<Props> = (({ vcs }) => {
|
||||
dispatch(activateWorkspace({ workspace }));
|
||||
}, [dispatch]);
|
||||
|
||||
const inputRef = useRef<HTMLInputElement>(null);
|
||||
const [filter, setFilter] = useState('');
|
||||
|
||||
// Render each card, removing all the ones that don't match the filter
|
||||
@@ -252,10 +250,6 @@ const WrapperHome: FC<Props> = (({ vcs }) => {
|
||||
setFilter(event.currentTarget.value);
|
||||
}, []);
|
||||
|
||||
useDocBodyKeyboardShortcuts({
|
||||
documents_filter: () => inputRef.current?.focus(),
|
||||
});
|
||||
|
||||
return (
|
||||
<PageLayout
|
||||
renderPageHeader={
|
||||
@@ -284,7 +278,7 @@ const WrapperHome: FC<Props> = (({ vcs }) => {
|
||||
}}
|
||||
>
|
||||
<input
|
||||
ref={inputRef}
|
||||
autoFocus
|
||||
type="text"
|
||||
placeholder="Filter..."
|
||||
onChange={onChangeFilter}
|
||||
|
||||
Reference in new issue
Block a user