fix: update delete button behavior in TreeCategoryHeader and TeamsList
- Removed unnecessary canDelete prop from TreeCategoryHeader's delete button condition. - Added disabled state to the delete button based on canDelete logic. - Updated canDelete prop in TeamsList to reflect whether the direction has members.
This commit is contained in:
@@ -50,7 +50,7 @@ export function TeamsList({
|
||||
itemLabel="équipe"
|
||||
showSeparator={index > 0}
|
||||
onDelete={() => onDeleteDirection(direction)}
|
||||
canDelete={true}
|
||||
canDelete={!getDirectionStats(direction).hasMembers}
|
||||
isDirection={true}
|
||||
directionStats={getDirectionStats(direction)}
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user