Files
twenty_crm/front/src/modules/ui/object/field/contexts/FieldContext.ts
Charles Bochet 726e375616 Complete labelIdentifer, relationPicker first implementation (#2618)
* Fix first column main identifier

* Fixes
2023-11-21 18:32:36 +01:00

20 lines
601 B
TypeScript

import { createContext } from 'react';
import { FieldDefinition } from '../types/FieldDefinition';
import { FieldMetadata } from '../types/FieldMetadata';
export type GenericFieldContextType = {
fieldDefinition: FieldDefinition<FieldMetadata>;
// TODO: add better typing for mutation web-hook
useUpdateEntityMutation?: () => [(params: any) => void, any];
entityId: string;
recoilScopeId?: string;
hotkeyScope: string;
isLabelIdentifier: boolean;
basePathToShowPage?: string;
};
export const FieldContext = createContext<GenericFieldContextType>(
{} as GenericFieldContextType,
);