diff --git a/components/kanban/KanbanFilters.tsx b/components/kanban/KanbanFilters.tsx index a1a932b..157b658 100644 --- a/components/kanban/KanbanFilters.tsx +++ b/components/kanban/KanbanFilters.tsx @@ -138,6 +138,15 @@ export function KanbanFilters({ filters, onFiltersChange }: KanbanFiltersProps) count: priorityCounts[priorityConfig.key] || 0 })); + // Trier les tags par nombre d'utilisation (décroissant) + const sortedTags = useMemo(() => { + return [...availableTags].sort((a, b) => { + const countA = tagCounts[a.name] || 0; + const countB = tagCounts[b.name] || 0; + return countB - countA; // Décroissant + }); + }, [availableTags, tagCounts]); + return (