@marimo-team/islands 0.25.3-dev162 → 0.25.3-dev168

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,6 @@
1
1
  /* Copyright 2026 Marimo. All rights reserved. */
2
2
 
3
+ import { useState } from "react";
3
4
  import {
4
5
  generateColumns,
5
6
  inferFieldTypes,
@@ -128,3 +129,33 @@ export const Pagination = {
128
129
 
129
130
  name: "Pagination",
130
131
  };
132
+
133
+ export const UnknownTotal = {
134
+ render: function UnknownTotal() {
135
+ const [paginationState, setPaginationState] = useState({
136
+ pageIndex: 0,
137
+ pageSize: 5,
138
+ });
139
+ const rows = Array.from({ length: 12 }, (_, index) => ({
140
+ value: index + 1,
141
+ }));
142
+ const offset = paginationState.pageIndex * paginationState.pageSize;
143
+ return (
144
+ <DataTable
145
+ data={rows.slice(offset, offset + paginationState.pageSize)}
146
+ columns={generateColumns({
147
+ fieldTypes: inferFieldTypes(rows),
148
+ rowHeaders: [],
149
+ selection: null,
150
+ })}
151
+ totalRows="too_many"
152
+ hasNextPage={offset + paginationState.pageSize < rows.length}
153
+ totalColumns={1}
154
+ pagination={true}
155
+ manualPagination={true}
156
+ paginationState={paginationState}
157
+ setPaginationState={setPaginationState}
158
+ />
159
+ );
160
+ },
161
+ };