diff --git a/webapp/src/components/sidebar/sidebar.tsx b/webapp/src/components/sidebar/sidebar.tsx index 9096c47cf..558cdd0b4 100644 --- a/webapp/src/components/sidebar/sidebar.tsx +++ b/webapp/src/components/sidebar/sidebar.tsx @@ -321,7 +321,6 @@ const Sidebar = (props: Props) => { }) const sortedBoards: Board[] = [] - console.log(JSON.stringify(category)) category.boardIDs.forEach((boardID) => { const b = categoryBoardsByID.get(boardID) if (b) { diff --git a/webapp/src/components/standardProperties/statusProperty/editStatusDialog.tsx b/webapp/src/components/standardProperties/statusProperty/editStatusDialog.tsx index af3a34b5a..14f01049d 100644 --- a/webapp/src/components/standardProperties/statusProperty/editStatusDialog.tsx +++ b/webapp/src/components/standardProperties/statusProperty/editStatusDialog.tsx @@ -80,59 +80,6 @@ const EditStatusPropertyDialog = (props: Props): JSX.Element => { props.onUpdate(updatedValueCategories) } - const generateValueRow = (categoryID: string, option: EditablePropertyOption, index: number): JSX.Element => { - return ( - - {(provided) => ( -
-
- -
- handleAddNewValue(categoryID, newOptionValue)} - /> -
- -
- )} - - ) - } - - const generateEmptyColumnPlaceholder = (categoryEmptyState: StatusCategoryEmptyState): JSX.Element => { - return ( -
-
- {categoryEmptyState.icon} -
-
- {categoryEmptyState.text} -
-
- ) - } - const handleAddCategoryValue = (categoryID: string) => { const categoryIndex = valueCategories.findIndex((valueCategory) => valueCategory.id === categoryID) if (categoryIndex < 0) { @@ -152,7 +99,7 @@ const EditStatusPropertyDialog = (props: Props): JSX.Element => { setValueCategories(updatedValueCategories) } - const onDragEndHandler = useCallback(async (result: DropResult) => { + const onDragEndHandler = (result: DropResult) => { const {destination, source, type} = result if (type !== 'statusCategory' || !destination) { @@ -172,7 +119,7 @@ const EditStatusPropertyDialog = (props: Props): JSX.Element => { updatedValues[destinationCategoryIndex].options.splice(destination.index, 0, draggedObject) setValueCategories(updatedValues) - }, [valueCategories]) + } return ( {
{ valueCategory.options.length === 0 && - generateEmptyColumnPlaceholder(valueCategory.emptyState) +
+
+ {valueCategory.emptyState.icon} +
+
+ {valueCategory.emptyState.text} +
+
} { valueCategory.options.length > 0 && - valueCategory.options.map((option, index) => generateValueRow(valueCategory.id, option, index)) + valueCategory.options.map((option: EditablePropertyOption, index) => ( + + {(draggableProvided) => ( +
+
+ +
+ handleAddNewValue(valueCategory.id, newOptionValue)} + /> +
+ +
+ )} + + )) }
{provided.placeholder}