Skip to content

Commit 8a4e94a

Browse files
authored
Merge pull request #118 from BEXIS2/table
Update pagination information
2 parents c5a7409 + 9f95e1c commit 8a4e94a

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

src/lib/components/Table/TableContent.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
toggle = false, // Whether to display the fitToScreen toggle
4949
search = true, // Whether to display the search input
5050
pageSizes = [5, 10, 20, 50, 100], // Page sizes to display in the pagination component
51-
pageIndexStringType = 'pages', // pages by default
51+
pageIndexStringType = 'items', // items by default
5252
fitToScreen = true, // Whether to fit the table to the screen,
5353
exportable = false, // Whether to display the export button and enable export functionality
5454
server

src/lib/components/Table/TablePagination.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@
6262
$: goToNextPageDisabled = !$hasNextPage;
6363
$: goToPreviousPageDisabled = !$hasPreviousPage;
6464
$: $pageSize = pageSizeDropdownValue;
65-
$: $pageCount, $pageIndex, $pageSize, (indexInformation = getIndexInfomationString());
65+
$: $pageCount, $pageIndex, $pageSize, itemCount, (indexInformation = getIndexInfomationString());
6666
</script>
6767

6868
<div class="flex justify-between w-full items-stretch gap-10">

src/routes/components/table/data/codeBlocks.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ export interface TableConfig<T> {
214214
exportable?: boolean; // false by default
215215
pageSizes?: number[]; // [5, 10, 20, 50, 100] by default
216216
defaultPageSize?: number; // 10 by default
217-
pageIndexStringType?: 'items' | 'pages'; // pages by default
217+
pageIndexStringType?: 'items' | 'pages'; // items by default
218218
optionsComponent?: typeof SvelteComponent;
219219
220220
server?: ServerConfig;

src/routes/components/table/docs/TableConfigDocs.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@
199199
<p class="text-xl pl-10">
200200
Whether the table should display page index information by number of items or pages. <code
201201
class="!text-xl bg-tertiary-300 dark:bg-tertiary-700/50 rounded-md p-0.5 text-primary-500"
202-
>"pages"</code
202+
>"items"</code
203203
>
204204
by default.
205205
</p>

0 commit comments

Comments
 (0)