Fix/scope hotkeys (#581)
* WIP * asd * Fix * Fix lint * Removed console log * asd * Removed isDefined * Fix/debounce company card onchange (#580) * Add internal state and debounce for editable text card * Use debounce for date fields too * Update refetch * Nit * Removed comments * Ménage --------- Co-authored-by: Emilien Chauvet <emilien.chauvet.enpc@gmail.com>
This commit is contained in:
@ -1,13 +1,13 @@
|
||||
import { Key } from 'ts-key-enum';
|
||||
|
||||
import { useAddToHotkeysScopeStack } from '@/hotkeys/hooks/useAddToHotkeysScopeStack';
|
||||
import { useScopedHotkeys } from '@/hotkeys/hooks/useScopedHotkeys';
|
||||
import { useSetHotkeysScope } from '@/hotkeys/hooks/useSetHotkeysScope';
|
||||
import { InternalHotkeysScope } from '@/hotkeys/types/internal/InternalHotkeysScope';
|
||||
import { useRecoilScopedState } from '@/recoil-scope/hooks/useRecoilScopedState';
|
||||
import { SingleEntitySelect } from '@/relation-picker/components/SingleEntitySelect';
|
||||
import { useFilteredSearchEntityQuery } from '@/relation-picker/hooks/useFilteredSearchEntityQuery';
|
||||
import { relationPickerSearchFilterScopedState } from '@/relation-picker/states/relationPickerSearchFilterScopedState';
|
||||
import { useEditableCell } from '@/ui/components/editable-cell/hooks/useCloseEditableCell';
|
||||
import { useEditableCell } from '@/ui/components/editable-cell/hooks/useEditableCell';
|
||||
import { isCreateModeScopedState } from '@/ui/components/editable-cell/states/isCreateModeScopedState';
|
||||
import { getLogoUrlFromDomainName } from '@/utils/utils';
|
||||
import {
|
||||
@ -32,7 +32,7 @@ export function PeopleCompanyPicker({ people }: OwnProps) {
|
||||
|
||||
const { closeEditableCell } = useEditableCell();
|
||||
|
||||
const addToScopeStack = useAddToHotkeysScopeStack();
|
||||
const addToScopeStack = useSetHotkeysScope();
|
||||
|
||||
const companies = useFilteredSearchEntityQuery({
|
||||
queryHook: useSearchCompanyQuery,
|
||||
@ -62,7 +62,7 @@ export function PeopleCompanyPicker({ people }: OwnProps) {
|
||||
|
||||
function handleCreate() {
|
||||
setIsCreating(true);
|
||||
addToScopeStack({ scope: InternalHotkeysScope.CellDoubleTextInput });
|
||||
addToScopeStack(InternalHotkeysScope.CellDoubleTextInput);
|
||||
}
|
||||
|
||||
useScopedHotkeys(
|
||||
|
||||
Reference in New Issue
Block a user