Skip to content

Commit

Permalink
Fix: 437 (#441)
Browse files Browse the repository at this point in the history
  • Loading branch information
Skylli202 authored Nov 14, 2023
1 parent 1a219eb commit 198a423
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions apps/www/src/content/components/data-table.md
Original file line number Diff line number Diff line change
Expand Up @@ -1331,7 +1331,7 @@ Next, we'll enable the `addSelectedRows` plugin and import the `<Checkbox />` co

To accommodate the checkbox, we'll need to update our table styles. We'll also add a message to show how many rows are selected.

```svelte showLineNumbers title="routes/payments/data-table.svelte" {39,65,87-90}
```svelte showLineNumbers title="routes/payments/data-table.svelte" {39,62-65,90-93}
<div>
<div class="flex items-center py-4">
<Input
Expand Down Expand Up @@ -1393,7 +1393,10 @@ To accommodate the checkbox, we'll need to update our table styles. We'll also a
<Table.Body {...$tableBodyAttrs}>
{#each $pageRows as row (row.id)}
<Subscribe rowAttrs={row.attrs()} let:rowAttrs>
<Table.Row {...rowAttrs}>
<Table.Row
{...rowAttrs}
data-state={$selectedDataIds[row.id] && "selected"}
>
{#each row.cells as cell (cell.id)}
<Subscribe attrs={cell.attrs()} let:attrs>
<Table.Cell {...attrs} class="[&:has([role=checkbox])]:pl-3">
Expand Down

1 comment on commit 198a423

@vercel
Copy link

@vercel vercel bot commented on 198a423 Nov 14, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.