Fix table click outside (#12038)
Fixes #12037 Follow up on #12011 Make `RecordTableBodyFocusClickOutsideEffect` also be available for `RecordIndexHotkeyScope.RecordIndex`
This commit is contained in:
@ -1,3 +1,4 @@
|
||||
import { RecordIndexHotkeyScope } from '@/object-record/record-index/types/RecordIndexHotkeyScope';
|
||||
import { RECORD_TABLE_CLICK_OUTSIDE_LISTENER_ID } from '@/object-record/record-table/constants/RecordTableClickOutsideListenerId';
|
||||
import { useRecordTableContextOrThrow } from '@/object-record/record-table/contexts/RecordTableContext';
|
||||
import { useLeaveTableFocus } from '@/object-record/record-table/hooks/internal/useLeaveTableFocus';
|
||||
@ -29,7 +30,10 @@ export const RecordTableBodyFocusClickOutsideEffect = ({
|
||||
listenerId: RECORD_TABLE_CLICK_OUTSIDE_LISTENER_ID,
|
||||
refs: [tableBodyRef],
|
||||
callback: () => {
|
||||
if (currentHotkeyScope.scope !== TableHotkeyScope.TableFocus) {
|
||||
if (
|
||||
currentHotkeyScope.scope !== TableHotkeyScope.TableFocus &&
|
||||
currentHotkeyScope.scope !== RecordIndexHotkeyScope.RecordIndex
|
||||
) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user