Remove cell hotkey scope (#11435)

Remove FieldContext hotkey scope as:
- each Field should set its own hotkey scope (ex:
emails-field-input-{recordId} or emails-field-input for now)
- while opening a fieldInput, we should synchronously set the
corresponding hotkey scope

To cut this refactoring in half, I'm allowing all input to use
TableHotkeyScope.CellEditMode
This commit is contained in:
Charles Bochet
2025-04-08 11:18:23 +02:00
committed by GitHub
parent 3d90eb4eb9
commit 17474a0e1e
98 changed files with 316 additions and 416 deletions

View File

@ -140,7 +140,6 @@ export const getFieldDecorator =
position: 0,
objectMetadataItem,
}),
hotkeyScope: 'hotkey-scope',
isReadOnly: false,
}}
>

View File

@ -6,7 +6,6 @@ import {
FieldContext,
RecordUpdateHook,
} from '@/object-record/record-field/contexts/FieldContext';
import { InlineCellHotkeyScope } from '@/object-record/record-inline-cell/types/InlineCellHotkeyScope';
export const useMockFieldContext = ({
clearable,
@ -15,7 +14,6 @@ export const useMockFieldContext = ({
isLabelIdentifier = false,
objectNameSingular,
objectRecordId,
customHotkeyScope,
}: {
clearable?: boolean;
fieldMetadataName: string;
@ -23,7 +21,6 @@ export const useMockFieldContext = ({
isLabelIdentifier?: boolean;
objectNameSingular: string;
objectRecordId: string;
customHotkeyScope?: string;
}) => {
const { objectMetadataItem } = useObjectMetadataItem({
objectNameSingular,
@ -53,8 +50,6 @@ export const useMockFieldContext = ({
objectMetadataItem,
}),
useUpdateRecord: useUpdateOneObjectMutation,
hotkeyScope:
customHotkeyScope ?? InlineCellHotkeyScope.InlineCell,
clearable,
isReadOnly: false,
}}