Creating records in side panel not working (#10999)

Fixes https://github.com/twentyhq/core-team-issues/issues/624

---------

Co-authored-by: Charles Bochet <charles@twenty.com>
This commit is contained in:
Guillim
2025-03-18 19:34:50 +01:00
committed by GitHub
parent 9e83d902d8
commit 841d48b704
6 changed files with 29 additions and 138 deletions

View File

@ -1,8 +1,6 @@
import React, { useEffect } from 'react';
import { useRecoilCallback } from 'recoil';
import { activeDropdownFocusIdState } from '@/ui/layout/dropdown/states/activeDropdownFocusIdState';
import { previousDropdownFocusIdState } from '@/ui/layout/dropdown/states/previousDropdownFocusIdState';
import { internalHotkeysEnabledScopesState } from '@/ui/utilities/hotkey/states/internal/internalHotkeysEnabledScopesState';
import { useClickOustideListenerStates } from '@/ui/utilities/pointer-event/hooks/useClickOustideListenerStates';
@ -190,32 +188,6 @@ export const useListenClickOutside = <T extends Element>({
!isMouseDownInside &&
!isClickedOnExcluded;
if (CLICK_OUTSIDE_DEBUG_MODE) {
const activeDropdownFocusId = snapshot
.getLoadable(activeDropdownFocusIdState)
.getValue();
const previousDropdownFocusId = snapshot
.getLoadable(previousDropdownFocusIdState)
.getValue();
// eslint-disable-next-line no-console
console.log('click outside compare refs', {
listenerId,
shouldTrigger,
isListening,
hasMouseDownHappened,
clickedOnAtLeastOneRef,
isMouseDownInside,
isClickedOnExcluded,
activeDropdownFocusId,
previousDropdownFocusId,
hotkeyScope,
enabled,
event,
});
}
if (shouldTrigger) {
callback(event);
}