Skip to content

Commit 0157ba3

Browse files
committed
🐛 Fix DataTable sorting not functioning when pagination is not present
1 parent 00b5e05 commit 0157ba3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/components/DataTable/DataTable.astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ const hasPagination = data?.length && itemsPerPage
113113
class:list={classes}
114114
style={maxHeight ? `max-height:${maxHeight}` : undefined}
115115
>
116-
<table data-items-per-page={itemsPerPage} data-page={hasPagination && 1}>
116+
<table data-items-per-page={itemsPerPage} data-page={hasPagination ? 1 : undefined}>
117117
{headings?.length && (
118118
<thead>
119119
<tr>

0 commit comments

Comments
 (0)