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:
@ -140,7 +140,6 @@ export const getFieldDecorator =
|
||||
position: 0,
|
||||
objectMetadataItem,
|
||||
}),
|
||||
hotkeyScope: 'hotkey-scope',
|
||||
isReadOnly: false,
|
||||
}}
|
||||
>
|
||||
|
||||
@ -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,
|
||||
}}
|
||||
|
||||
Reference in New Issue
Block a user