fix(Map): Fixed delete system on signature deletion

This commit is contained in:
Dmitry Popov
2025-02-22 09:10:12 +01:00
parent 2d92dfbafa
commit 82f6a7f701
3 changed files with 15 additions and 8 deletions

View File

@@ -13,18 +13,15 @@ import {
GROUPS_LIST,
MEDIUM_MAX_WIDTH,
OTHER_COLUMNS_WIDTH,
getGroupIdByRawGroup,
} from '@/hooks/Mapper/components/mapInterface/widgets/SystemSignatures/constants';
import {
SHOW_DESCRIPTION_COLUMN_SETTING,
SHOW_UPDATED_COLUMN_SETTING,
SHOW_CHARACTER_COLUMN_SETTING,
SIGNATURE_WINDOW_ID,
} from '../SystemSignatures';
import {
getGroupIdByRawGroup,
GROUPS_LIST,
} from '@/hooks/Mapper/components/mapInterface/widgets/SystemSignatures/constants.ts';
import { COSMIC_SIGNATURE } from '../SystemSignatureSettingsDialog';
import {
renderAddedTimeLeft,
@@ -105,6 +102,12 @@ export function SystemSignaturesContent({
useHotkey(true, ['a'], handleSelectAll);
useHotkey(false, ['Backspace', 'Delete'], (event: KeyboardEvent) => {
const targetWindow = (event.target as HTMLHtmlElement)?.closest(`[data-window-id="${SIGNATURE_WINDOW_ID}"]`);
if (!targetWindow) {
return;
}
event.preventDefault();
event.stopPropagation();
handleDeleteSelected();