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

@ -1,10 +1,11 @@
import { Decorator } from '@storybook/react';
import { RecordPickerComponentInstanceContext } from '@/object-record/relation-picker/states/contexts/RecordPickerComponentInstanceContext';
import { RelationPickerHotkeyScope } from '@/object-record/relation-picker/types/RelationPickerHotkeyScope';
export const RecordPickerDecorator: Decorator = (Story) => (
<RecordPickerComponentInstanceContext.Provider
value={{ instanceId: 'record-picker' }}
value={{ instanceId: RelationPickerHotkeyScope.RelationPicker }}
>
<Story />
</RecordPickerComponentInstanceContext.Provider>