Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: Typo in next data table docs #1467

Merged
merged 1 commit into from
Nov 9, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions sites/docs/src/content/components/data-table.md
Original file line number Diff line number Diff line change
Expand Up @@ -162,12 +162,12 @@ Next, we'll create a `<DataTable />` component to render our table.
} from "$lib/components/ui/data-table/index.js";
import * as Table from "$lib/components/ui/table/index.js";

type DateTableProps<TData, TValue> = {
type DataTableProps<TData, TValue> = {
columns: ColumnDef<TData, TValue>[];
data: TData[];
};

let { data, columns }: DateTableProps<TData, TValue> = $props();
let { data, columns }: DataTableProps<TData, TValue> = $props();

const table = createSvelteTable({
get data() {
Expand Down Expand Up @@ -402,7 +402,7 @@ Next, we'll add pagination to our table.
columns: ColumnDef<TData, TValue>[];
};

let { data, columns }: DateTableProps<TData, TValue> = $props();
let { data, columns }: DataTableProps<TData, TValue> = $props();

let pagination = $state<PaginationState>({ pageIndex: 0, pageSize: 10 });

Expand Down Expand Up @@ -439,7 +439,7 @@ We can add pagination controls to our table using the `<Button />` component and
<script lang="ts" generics="TData, TValue">
import { Button } from "$lib/components/ui/button/index.js";

let { columns, data }: DateTableProps<TData, TValue> = $props();
let { columns, data }: DataTableProps<TData, TValue> = $props();

let pagination = $state<PaginationState>({ pageIndex: 0, pageSize: 10 });

Expand Down Expand Up @@ -523,7 +523,7 @@ We'll start by creating a component to render a sortable email header button.
getSortedRowModel,
} from "@tanstack/table-core";

let { columns, data }: DateTableProps<TData, TValue> = $props();
let { columns, data }: DataTableProps<TData, TValue> = $props();

let pagination = $state<PaginationState>({ pageIndex: 0, pageSize: 10 });
let sorting = $state<SortingState>([]);
Expand Down Expand Up @@ -612,7 +612,7 @@ Let's add a search input to filter emails in our table.
} from "@tanstack/table-core";
import { Input } from "$lib/components/ui/input/index.js";

let { columns, data }: DateTableProps<TData, TValue> = $props();
let { columns, data }: DataTableProps<TData, TValue> = $props();

let pagination = $state<PaginationState>({ pageIndex: 0, pageSize: 10 });
let sorting = $state<SortingState>([]);
Expand Down Expand Up @@ -709,7 +709,7 @@ Adding column visibility is fairly simple using `@tanstack/table-core` visibilit
} from "@tanstack/table-core";
import * as DropdownMenu from "$lib/components/ui/dropdown-menu/index.js";

let { columns, data }: DateTableProps<TData, TValue> = $props();
let { columns, data }: DataTableProps<TData, TValue> = $props();

let pagination = $state<PaginationState>({ pageIndex: 0, pageSize: 10 });
let sorting = $state<SortingState>([]);
Expand Down Expand Up @@ -894,7 +894,7 @@ export const columns: ColumnDef<Payment>[] = [
} from "@tanstack/table-core";
import * as DropdownMenu from "$lib/components/ui/dropdown-menu/index.js";

let { columns, data }: DateTableProps<TData, TValue> = $props();
let { columns, data }: DataTableProps<TData, TValue> = $props();

let pagination = $state<PaginationState>({ pageIndex: 0, pageSize: 10 });
let sorting = $state<SortingState>([]);
Expand Down