Skip to content

Commit b09d737

Browse files
authored
feat: adds a dropdown when pages exceed 10 (#4242)
1 parent 604133b commit b09d737

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

assets/components/ContainerTable.vue

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@
104104
</table>
105105
</div>
106106
<div class="p-4 text-center">
107-
<nav class="join" v-if="isPaginated">
107+
<nav class="join" v-if="isPaginated && totalPages <= 15">
108108
<input
109109
class="btn btn-square join-item"
110110
type="radio"
@@ -114,6 +114,12 @@
114114
v-for="i in totalPages"
115115
/>
116116
</nav>
117+
<DropdownMenu
118+
v-else-if="isPaginated"
119+
class="btn-sm"
120+
v-model="currentPage"
121+
:options="Array.from({ length: totalPages }, (_, i) => ({ label: `${i + 1}`, value: i + 1 }))"
122+
/>
117123
</div>
118124
</div>
119125
</template>

0 commit comments

Comments
 (0)