Refacto/abstract inplace input (#530)
* Move code to new folder * Deduplicate code, remove dependancy on table * Remove more table dependency * Move close logic to input * Migrate editable text cell * Rename EditableTextInput * Fix component test id
This commit is contained in:
@ -1,7 +1,7 @@
|
||||
import CompanyChip from '@/companies/components/CompanyChip';
|
||||
import { useRecoilScopedState } from '@/recoil-scope/hooks/useRecoilScopedState';
|
||||
import { EditableCell } from '@/ui/components/editable-cell/EditableCell';
|
||||
import { isCreateModeScopedState } from '@/ui/components/editable-cell/states/isCreateModeScopedState';
|
||||
import { isCreateModeScopedState } from '@/ui/components/inplace-input/states/isCreateModeScopedState';
|
||||
import { getLogoUrlFromDomainName } from '@/utils/utils';
|
||||
import { Company, Person } from '~/generated/graphql';
|
||||
|
||||
|
||||
@ -4,7 +4,7 @@ import { v4 } from 'uuid';
|
||||
|
||||
import { useRecoilScopedState } from '@/recoil-scope/hooks/useRecoilScopedState';
|
||||
import { relationPickerSearchFilterScopedState } from '@/relation-picker/states/relationPickerSearchFilterScopedState';
|
||||
import { isCreateModeScopedState } from '@/ui/components/editable-cell/states/isCreateModeScopedState';
|
||||
import { isCreateModeScopedState } from '@/ui/components/inplace-input/states/isCreateModeScopedState';
|
||||
import { DoubleTextInput } from '@/ui/components/inputs/DoubleTextInput';
|
||||
import { useListenClickOutsideArrayOfRef } from '@/ui/hooks/useListenClickOutsideArrayOfRef';
|
||||
import { logError } from '@/utils/logs/logError';
|
||||
|
||||
@ -2,8 +2,8 @@ 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 { isCreateModeScopedState } from '@/ui/components/editable-cell/states/isCreateModeScopedState';
|
||||
import { useInplaceInput } from '@/ui/components/inplace-input/hooks/useCloseInplaceInput';
|
||||
import { isCreateModeScopedState } from '@/ui/components/inplace-input/states/isCreateModeScopedState';
|
||||
import { getLogoUrlFromDomainName } from '@/utils/utils';
|
||||
import {
|
||||
CommentableType,
|
||||
@ -25,7 +25,7 @@ export function PeopleCompanyPicker({ people }: OwnProps) {
|
||||
);
|
||||
const [updatePeople] = useUpdatePeopleMutation();
|
||||
|
||||
const { closeEditableCell } = useEditableCell();
|
||||
const { closeInplaceInput } = useInplaceInput();
|
||||
|
||||
const companies = useFilteredSearchEntityQuery({
|
||||
queryHook: useSearchCompanyQuery,
|
||||
@ -50,7 +50,7 @@ export function PeopleCompanyPicker({ people }: OwnProps) {
|
||||
},
|
||||
});
|
||||
|
||||
closeEditableCell();
|
||||
closeInplaceInput();
|
||||
}
|
||||
|
||||
function handleCreate() {
|
||||
|
||||
Reference in New Issue
Block a user