Skip to content

Commit

Permalink
Displayed number of tasks under tasks table
Browse files Browse the repository at this point in the history
  • Loading branch information
zonia3000 committed Dec 9, 2024
1 parent e40097c commit da7e46b
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions components/src/lib/tasks/FilteredTasksTable.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@
setup();
}
$: selectedTasksCount = filteredRows.reduce((acc, row) => acc + row.tasks.length, 0);
$: tasksCount = allRows.reduce((acc, row) => acc + row.tasks.length, 0);
$: if (
genericSearch ||
categoryFilter ||
Expand Down Expand Up @@ -429,6 +432,10 @@
</table>
</div>
</div>
<p class="mt-3 text-center mb-0">
Showing {selectedTasksCount} of {tasksCount}
{tasksCount === 1 ? 'task' : 'tasks'}
</p>
{/if}
<style>
Expand Down

0 comments on commit da7e46b

Please sign in to comment.