@a2v2ai/uikit 1.1.0 → 1.1.1
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.
- package/DataTable/DataTable.tsx +30 -32
- package/package.json +1 -1
package/DataTable/DataTable.tsx
CHANGED
|
@@ -184,41 +184,39 @@ const DataTable = <T extends object>({
|
|
|
184
184
|
{pagination &&
|
|
185
185
|
((pagination.pageSizeOptions && pagination.pageSizeOptions.length > 0) ||
|
|
186
186
|
totalPages > 1) && (
|
|
187
|
-
<div className="mt-4 flex items-center justify-
|
|
187
|
+
<div className="mt-4 flex items-center justify-center gap-6">
|
|
188
188
|
{pagination.pageSizeOptions &&
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
>
|
|
196
|
-
{rowsPerPageLabel}
|
|
197
|
-
</Typography>
|
|
198
|
-
{/* Fixed-width wrapper: SelectTrigger has its own w-full wrapper. */}
|
|
199
|
-
<div className="w-20">
|
|
200
|
-
<Select
|
|
201
|
-
value={String(pagination.pageSize)}
|
|
202
|
-
onValueChange={(value) =>
|
|
203
|
-
pagination.onPageSizeChange?.(Number(value))
|
|
204
|
-
}
|
|
189
|
+
pagination.pageSizeOptions.length > 0 && (
|
|
190
|
+
<div className="flex items-center gap-2">
|
|
191
|
+
<Typography
|
|
192
|
+
variant="body3"
|
|
193
|
+
color="main-700"
|
|
194
|
+
className="whitespace-nowrap"
|
|
205
195
|
>
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
196
|
+
{rowsPerPageLabel}
|
|
197
|
+
</Typography>
|
|
198
|
+
{/* Fixed-width wrapper: SelectTrigger has its own w-full wrapper. */}
|
|
199
|
+
<div className="w-20">
|
|
200
|
+
<Select
|
|
201
|
+
value={String(pagination.pageSize)}
|
|
202
|
+
onValueChange={(value) =>
|
|
203
|
+
pagination.onPageSizeChange?.(Number(value))
|
|
204
|
+
}
|
|
205
|
+
>
|
|
206
|
+
<SelectTrigger size="small" aria-label={rowsPerPageLabel}>
|
|
207
|
+
<SelectValue />
|
|
208
|
+
</SelectTrigger>
|
|
209
|
+
<SelectContent>
|
|
210
|
+
{pagination.pageSizeOptions.map((option) => (
|
|
211
|
+
<SelectItem key={option} value={String(option)}>
|
|
212
|
+
{option}
|
|
213
|
+
</SelectItem>
|
|
214
|
+
))}
|
|
215
|
+
</SelectContent>
|
|
216
|
+
</Select>
|
|
217
|
+
</div>
|
|
217
218
|
</div>
|
|
218
|
-
|
|
219
|
-
) : (
|
|
220
|
-
<span />
|
|
221
|
-
)}
|
|
219
|
+
)}
|
|
222
220
|
|
|
223
221
|
{totalPages > 1 && (
|
|
224
222
|
<Pagination className="mx-0 w-auto justify-end">
|