diff --git a/front/src/modules/ui/board/components/BoardColumn.tsx b/front/src/modules/ui/board/components/BoardColumn.tsx
index 9175bd5dd8..b07937f868 100644
--- a/front/src/modules/ui/board/components/BoardColumn.tsx
+++ b/front/src/modules/ui/board/components/BoardColumn.tsx
@@ -73,10 +73,9 @@ const StyledNumChildren = styled.div`
`;
type OwnProps = {
- color?: string;
+ color: string;
title: string;
- onTitleEdit: (title: string) => void;
- onColumnColorEdit: (color: string) => void;
+ onTitleEdit: (title: string, color: string) => void;
totalAmount?: number;
children: React.ReactNode;
isFirstColumn: boolean;
@@ -87,7 +86,6 @@ export function BoardColumn({
color,
title,
onTitleEdit,
- onColumnColorEdit,
totalAmount,
children,
isFirstColumn,
@@ -124,7 +122,6 @@ export function BoardColumn({
diff --git a/front/src/modules/ui/board/components/BoardColumnEditTitleMenu.tsx b/front/src/modules/ui/board/components/BoardColumnEditTitleMenu.tsx
index c6a287fced..b663e71f9e 100644
--- a/front/src/modules/ui/board/components/BoardColumnEditTitleMenu.tsx
+++ b/front/src/modules/ui/board/components/BoardColumnEditTitleMenu.tsx
@@ -31,9 +31,8 @@ const StyledEditModeInput = styled.input`
type OwnProps = {
onClose: () => void;
title: string;
- onTitleEdit: (title: string) => void;
- onColumnColorEdit: (color: string) => void;
- color?: string;
+ onTitleEdit: (title: string, color: string) => void;
+ color: string;
};
const StyledColorSample = styled.div<{ colorName: string }>`
@@ -61,15 +60,17 @@ export const COLOR_OPTIONS = [
export function BoardColumnEditTitleMenu({
onClose,
onTitleEdit,
- onColumnColorEdit,
title,
color,
}: OwnProps) {
const [internalValue, setInternalValue] = useState(title);
- const debouncedOnUpdate = debounce(onTitleEdit, 200);
+ const debouncedOnUpdateTitle = debounce(
+ (newTitle) => onTitleEdit(newTitle, color),
+ 200,
+ );
const handleChange = (event: ChangeEvent) => {
setInternalValue(event.target.value);
- debouncedOnUpdate(event.target.value);
+ debouncedOnUpdateTitle(event.target.value);
};
return (
@@ -86,7 +87,7 @@ export function BoardColumnEditTitleMenu({
{
- onColumnColorEdit(colorOption.id);
+ onTitleEdit(title, colorOption.id);
onClose();
}}
selected={colorOption.id === color}
diff --git a/front/src/modules/ui/board/components/BoardColumnMenu.tsx b/front/src/modules/ui/board/components/BoardColumnMenu.tsx
index 55ed3f8d9c..3305704354 100644
--- a/front/src/modules/ui/board/components/BoardColumnMenu.tsx
+++ b/front/src/modules/ui/board/components/BoardColumnMenu.tsx
@@ -23,15 +23,13 @@ const StyledMenuContainer = styled.div`
type OwnProps = {
onClose: () => void;
title: string;
- color?: string;
- onTitleEdit: (title: string) => void;
- onColumnColorEdit: (color: string) => void;
+ color: string;
+ onTitleEdit: (title: string, color: string) => void;
};
export function BoardColumnMenu({
onClose,
onTitleEdit,
- onColumnColorEdit,
title,
color,
}: OwnProps) {
@@ -66,7 +64,6 @@ export function BoardColumnMenu({
color={color}
onClose={onClose}
onTitleEdit={onTitleEdit}
- onColumnColorEdit={onColumnColorEdit}
title={title}
/>
)}
diff --git a/front/src/modules/ui/board/components/EntityBoard.tsx b/front/src/modules/ui/board/components/EntityBoard.tsx
index 3697e8ffbf..6f3090887e 100644
--- a/front/src/modules/ui/board/components/EntityBoard.tsx
+++ b/front/src/modules/ui/board/components/EntityBoard.tsx
@@ -40,14 +40,12 @@ export function EntityBoard({
boardOptions,
updateSorts,
onEditColumnTitle,
- onEditColumnColor,
}: {
boardOptions: BoardOptions;
updateSorts: (
sorts: Array>,
) => void;
- onEditColumnTitle: (columnId: string, title: string) => void;
- onEditColumnColor: (columnId: string, color: string) => void;
+ onEditColumnTitle: (columnId: string, title: string, color: string) => void;
}) {
const [boardColumns] = useRecoilState(boardColumnsState);
@@ -138,7 +136,6 @@ export function EntityBoard({
boardOptions={boardOptions}
column={column}
onEditColumnTitle={onEditColumnTitle}
- onEditColumnColor={onEditColumnColor}
/>
diff --git a/front/src/modules/ui/board/components/EntityBoardColumn.tsx b/front/src/modules/ui/board/components/EntityBoardColumn.tsx
index fb74942ac5..1c3202f640 100644
--- a/front/src/modules/ui/board/components/EntityBoardColumn.tsx
+++ b/front/src/modules/ui/board/components/EntityBoardColumn.tsx
@@ -51,12 +51,10 @@ export function EntityBoardColumn({
column,
boardOptions,
onEditColumnTitle,
- onEditColumnColor,
}: {
column: BoardColumnDefinition;
boardOptions: BoardOptions;
- onEditColumnTitle: (columnId: string, title: string) => void;
- onEditColumnColor: (columnId: string, color: string) => void;
+ onEditColumnTitle: (columnId: string, title: string, color: string) => void;
}) {
const boardColumnId = useContext(BoardColumnIdContext) ?? '';
@@ -68,19 +66,14 @@ export function EntityBoardColumn({
boardCardIdsByColumnIdFamilyState(boardColumnId ?? ''),
);
- function handleEditColumnTitle(value: string) {
- onEditColumnTitle(boardColumnId, value);
- }
-
- function handleEditColumnColor(newColor: string) {
- onEditColumnColor(boardColumnId, newColor);
+ function handleEditColumnTitle(title: string, color: string) {
+ onEditColumnTitle(boardColumnId, title, color);
}
return (
{(droppableProvided) => (