Feat/generic editable board card (#1089)
* Fixed BoardColumnMenu * Fixed naming * Optimized board loading * Added GenericEditableField * Introduce GenericEditableField for BoardCards * remove logs * delete unused files * fix stories --------- Co-authored-by: corentin <corentin@twenty.com>
This commit is contained in:
@ -1,10 +1,8 @@
|
||||
import React from 'react';
|
||||
import styled from '@emotion/styled';
|
||||
import { Key } from 'ts-key-enum';
|
||||
|
||||
import { Tag } from '@/ui/tag/components/Tag';
|
||||
import { usePreviousHotkeyScope } from '@/ui/utilities/hotkey/hooks/usePreviousHotkeyScope';
|
||||
import { useScopedHotkeys } from '@/ui/utilities/hotkey/hooks/useScopedHotkeys';
|
||||
|
||||
import { BoardColumnHotkeyScope } from '../types/BoardColumnHotkeyScope';
|
||||
|
||||
@ -77,7 +75,6 @@ const StyledNumChildren = styled.div`
|
||||
type OwnProps = {
|
||||
color?: string;
|
||||
title: string;
|
||||
pipelineStageId?: string;
|
||||
onTitleEdit: (title: string) => void;
|
||||
onColumnColorEdit: (color: string) => void;
|
||||
totalAmount?: number;
|
||||
@ -104,13 +101,6 @@ export function BoardColumn({
|
||||
goBackToPreviousHotkeyScope,
|
||||
} = usePreviousHotkeyScope();
|
||||
|
||||
useScopedHotkeys(
|
||||
[Key.Escape, Key.Enter],
|
||||
handleClose,
|
||||
BoardColumnHotkeyScope.BoardColumn,
|
||||
[],
|
||||
);
|
||||
|
||||
function handleTitleClick() {
|
||||
setIsBoardColumnMenuOpen(true);
|
||||
setHotkeyScopeAndMemorizePreviousScope(BoardColumnHotkeyScope.BoardColumn, {
|
||||
@ -132,7 +122,7 @@ export function BoardColumn({
|
||||
</StyledHeader>
|
||||
{isBoardColumnMenuOpen && (
|
||||
<BoardColumnMenu
|
||||
onClose={() => setIsBoardColumnMenuOpen(false)}
|
||||
onClose={handleClose}
|
||||
onTitleEdit={onTitleEdit}
|
||||
onColumnColorEdit={onColumnColorEdit}
|
||||
title={title}
|
||||
|
||||
Reference in New Issue
Block a user