Migrate record table to scope map (#3363)
* Migrate record table to scope map * Update record scope id to record id * Remove todos and fix edit mode * Fix perf * Fix tests * Fix tests --------- Co-authored-by: Thomas Trompette <thomast@twenty.com> Co-authored-by: Charles Bochet <charles@twenty.com>
This commit is contained in:
@ -27,7 +27,7 @@ describe('useInternalHotkeyScopeManagement', () => {
|
||||
const { dropdownHotkeyScopeState } = useDropdownStates({
|
||||
dropdownScopeId,
|
||||
});
|
||||
const dropdownHotkeyScope = useRecoilValue(dropdownHotkeyScopeState);
|
||||
const dropdownHotkeyScope = useRecoilValue(dropdownHotkeyScopeState());
|
||||
return { dropdownHotkeyScope };
|
||||
},
|
||||
{
|
||||
|
||||
@ -18,12 +18,14 @@ export const useDropdown = (dropdownId?: string) => {
|
||||
goBackToPreviousHotkeyScope,
|
||||
} = usePreviousHotkeyScope();
|
||||
|
||||
const [dropdownHotkeyScope] = useRecoilState(dropdownHotkeyScopeState);
|
||||
const [dropdownHotkeyScope] = useRecoilState(dropdownHotkeyScopeState());
|
||||
|
||||
const [dropdownWidth, setDropdownWidth] = useRecoilState(dropdownWidthState);
|
||||
const [dropdownWidth, setDropdownWidth] =
|
||||
useRecoilState(dropdownWidthState());
|
||||
|
||||
const [isDropdownOpen, setIsDropdownOpen] =
|
||||
useRecoilState(isDropdownOpenState);
|
||||
const [isDropdownOpen, setIsDropdownOpen] = useRecoilState(
|
||||
isDropdownOpenState(),
|
||||
);
|
||||
|
||||
const closeDropdown = () => {
|
||||
goBackToPreviousHotkeyScope();
|
||||
|
||||
@ -15,7 +15,7 @@ export const useInternalHotkeyScopeManagement = ({
|
||||
const { dropdownHotkeyScopeState } = useDropdownStates({ dropdownScopeId });
|
||||
|
||||
const [dropdownHotkeyScope, setDropdownHotkeyScope] = useRecoilState(
|
||||
dropdownHotkeyScopeState,
|
||||
dropdownHotkeyScopeState(),
|
||||
);
|
||||
|
||||
useEffect(() => {
|
||||
|
||||
Reference in New Issue
Block a user