Skip to content

Commit 4ee1534

Browse files
committed
doc: add server-side documentation
1 parent 2d24828 commit 4ee1534

File tree

4 files changed

+30
-2
lines changed

4 files changed

+30
-2
lines changed

docs/src/routes/docs/[...3]plugins/[...2]add-sort-by/+page.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,12 @@ Allows customization of the toggling order. This cannot contain duplicate values
5151

5252
_Defaults to `['asc', 'desc', undefined]`_.
5353

54+
### `serverSide?: boolean`
55+
56+
If `true`, the sort plugin will have no effect on the rows of the table. Instead, you can control sorting by updating [`$data`](../api/create-table.md#createtable-data-plugins-table). The plugin's state can be used as variables in your data-fetching query to get sorted data from the server directly.
57+
58+
_Defaults to `false`_.
59+
5460
## Column Options
5561

5662
:::callout

docs/src/routes/docs/[...3]plugins/[...3]add-column-filters/+page.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,11 @@ const table = createTable(data, {
2525
});
2626
```
2727

28-
_Nothing here so far_.
28+
### `serverSide?: boolean`
29+
30+
If `true`, the column filter will have no effect on the rows of the table. Instead, you can control filtering by updating [`$data`](../api/create-table.md#createtable-data-plugins-table). The plugin's state can be used as variables in your data-fetching query to get filtered data from the server directly.
31+
32+
_Defaults to `false`_.
2933

3034
## Column Options
3135

docs/src/routes/docs/[...3]plugins/[...4]add-table-filter/+page.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,12 @@ Determines if hidden columns should be searched for matching values.
4747

4848
_Defaults to `false`_.
4949

50+
### `serverSide?: boolean`
51+
52+
If `true`, the table filter will have no effect on the rows of the table. Instead, you can control filtering by updating [`$data`](../api/create-table.md#createtable-data-plugins-table). The plugin's state can be used as variables in your data-fetching query to get filtered data from the server directly.
53+
54+
_Defaults to `false`_.
55+
5056
## Column Options
5157

5258
:::callout

docs/src/routes/docs/[...3]plugins/[...7]add-pagination/+page.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ sidebar_title: addPagination
1111

1212
# {$frontmatter?.title}
1313

14-
`addPagination` paginates the table by page index. For token-based pagination, refer to [`addTokenPagination`](#).
14+
`addPagination` paginates the table by page index.
1515

1616
:::admonition type="note"
1717
Subscribe to [`TableViewModel#pageRows`](../api/table-view-model.md#tableviewmodel-pagerows-readable-bodyrow) instead of `TableViewModel#rows`.
@@ -58,6 +58,12 @@ Sets the initial page size.
5858

5959
_Defaults to `10`_.
6060

61+
### `serverSide?: boolean`
62+
63+
If `true`, the pagination plugin will have no effect on the rows of the table. Instead, you can control pagination by updating [`$data`](../api/create-table.md#createtable-data-plugins-table). The plugin's state can be used as variables in your data-fetching query to get paginated data from the server directly.
64+
65+
_Defaults to `false`_.
66+
6167
## Column Options
6268

6369
:::callout
@@ -132,6 +138,12 @@ Whether a next page is available.
132138

133139
The total number of pages derived from the number of rows and page size.
134140

141+
### `serverItemCount: Writable<number>`
142+
143+
The total number of items expected from the server.
144+
145+
When using server-side pagination, the number of items in `$data` only reflects the number of items in the page and not the number of total items. To calculate the right number of pages required, the plugin needs to know how many items in total are expected.
146+
135147
## Examples
136148

137149
### Simple pagination

0 commit comments

Comments
 (0)