Skip to content

Commit

Permalink
Extract count and checkedCount to component level
Browse files Browse the repository at this point in the history
  • Loading branch information
Acylation committed Apr 26, 2024
1 parent d73eb38 commit 29701fd
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/ui/views/Board/components/Board/BoardColumn.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,11 @@
export let onEdit: (editing: boolean) => void;
$: onEdit(editing);
$: count = records.length;
$: checkedCount = checkField
? records.filter((r) => r.values[checkField]).length
: 0;
function onColumnMenu() {
const menu = new Menu();
Expand Down Expand Up @@ -104,10 +109,8 @@
>
<ColumnHeader
value={name}
count={records.length}
checkedCount={checkField
? records.filter((r) => r.values[checkField]).length
: 0}
{count}
{checkedCount}
bind:editing
{richText}
{collapse}
Expand Down

0 comments on commit 29701fd

Please sign in to comment.