@@ -23,22 +23,17 @@ const effectiveMode = computed<PaginationMode>(() =>
2323)
2424
2525// When 'all' is selected, there's only 1 page with everything
26- const isShowingAll = computed (() => pageSize .value === ' all' )
27- const totalPages = computed (() =>
28- isShowingAll .value ? 1 : Math .ceil (props .totalItems / (pageSize .value as number )),
29- )
26+ const totalPages = computed (() => Math .ceil (props .totalItems / (pageSize .value as number )))
3027
3128// Whether to show the mode toggle (hidden in table view since table always uses pagination)
3229const showModeToggle = computed (() => props .viewMode !== ' table' )
3330
3431const startItem = computed (() => {
3532 if (props .totalItems === 0 ) return 0
36- if (isShowingAll .value ) return 1
3733 return (currentPage .value - 1 ) * (pageSize .value as number ) + 1
3834})
3935
4036const endItem = computed (() => {
41- if (isShowingAll .value ) return props .totalItems
4237 return Math .min (currentPage .value * (pageSize .value as number ), props .totalItems )
4338})
4439
@@ -159,10 +154,7 @@ function handlePageSizeChange(event: Event) {
159154 @change =" handlePageSizeChange"
160155 :items ="
161156 PAGE_SIZE_OPTIONS.map(size => ({
162- label:
163- size === 'all'
164- ? $t('filters.pagination.all_yolo')
165- : $t('filters.pagination.per_page', { count: size }),
157+ label: $t('filters.pagination.per_page', { count: size }),
166158 value: String(size),
167159 }))
168160 "
0 commit comments