fix: Update company picker keyboard navigation (#1628)

* fix: scroll

* fix: use ref

* fix: new changes

* fix: remove ref

* fix: state

* chore: clean up

* Include Empty option

* Include Empty option

* Include Empty option

* Fix tests

---------

Co-authored-by: Charles Bochet <charles@twenty.com>
This commit is contained in:
Nafees Nazik
2023-09-22 01:23:07 +05:30
committed by GitHub
parent 7ce03ffdd1
commit a59f5acd5e
10 changed files with 175 additions and 97 deletions
@@ -0,0 +1,5 @@
import { createContext } from 'react';
export const RelationPickerRecoilScopeContext = createContext<string | null>(
'relation-picker-context',
);
@@ -1,6 +0,0 @@
import { atomFamily } from 'recoil';
export const relationPickerHoverIndexScopedState = atomFamily<number, string>({
key: 'relationPickerHoverIndexScopedState',
default: 0,
});
@@ -0,0 +1,9 @@
import { atomFamily } from 'recoil';
export const relationPickerPreselectedIdScopedState = atomFamily<
string,
string
>({
key: 'relationPickerPreselectedIdScopedState',
default: (param) => param,
});