Fixed single record select hotkeys (#9433)

There is a problem of hotkey scope not being passed to the relation
picker used for single record select fields.

Fixed it where we open a single record select.
This commit is contained in:
Lucas Bordeau
2025-01-07 17:06:06 +01:00
committed by GitHub
parent 0c75b244ba
commit 6129052850
10 changed files with 77 additions and 38 deletions

View File

@ -9,6 +9,7 @@ import { SearchPickerInitialValueEffect } from '@/object-record/relation-picker/
import { SingleRecordSelect } from '@/object-record/relation-picker/components/SingleRecordSelect';
import { useAddNewRecordAndOpenRightDrawer } from '@/object-record/relation-picker/hooks/useAddNewRecordAndOpenRightDrawer';
import { RecordForSelect } from '@/object-record/relation-picker/types/RecordForSelect';
import { RelationPickerHotkeyScope } from '@/object-record/relation-picker/types/RelationPickerHotkeyScope';
export type RelationPickerProps = {
selectedRecordId?: string;
@ -29,7 +30,7 @@ export const RelationPicker = ({
initialSearchFilter,
fieldDefinition,
}: RelationPickerProps) => {
const recordPickerInstanceId = 'relation-picker';
const recordPickerInstanceId = RelationPickerHotkeyScope.RelationPicker;
const handleRecordSelected = (
selectedRecord: RecordForSelect | null | undefined,