refactor(task-list): enhance task row components with depth handling
- Added depth and maxDepth props to TaskRow, TaskRowWithSubtasks, and TitleColumn components to manage nested subtasks more effectively. - Updated AddSubtaskRow to support depth for proper indentation and visual hierarchy. - Improved styling for subtasks based on their depth level, ensuring better visual distinction. - Adjusted task management slice to utilize actual subtask counts from the backend for accurate display.
This commit is contained in:
@@ -58,6 +58,9 @@ interface UseTaskRowColumnsProps {
|
||||
// Drag and drop
|
||||
attributes: any;
|
||||
listeners: any;
|
||||
|
||||
// Depth for nested subtasks
|
||||
depth?: number;
|
||||
}
|
||||
|
||||
export const useTaskRowColumns = ({
|
||||
@@ -84,6 +87,7 @@ export const useTaskRowColumns = ({
|
||||
handleTaskNameEdit,
|
||||
attributes,
|
||||
listeners,
|
||||
depth = 0,
|
||||
}: UseTaskRowColumnsProps) => {
|
||||
|
||||
const renderColumn = useCallback((columnId: string, width: string, isSticky?: boolean, index?: number) => {
|
||||
@@ -128,6 +132,7 @@ export const useTaskRowColumns = ({
|
||||
onEditTaskName={setEditTaskName}
|
||||
onTaskNameChange={setTaskName}
|
||||
onTaskNameSave={handleTaskNameSave}
|
||||
depth={depth}
|
||||
/>
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user