first commit
This commit is contained in:
6
resources/js/utils/paginationMeta.js
Normal file
6
resources/js/utils/paginationMeta.js
Normal file
@@ -0,0 +1,6 @@
|
||||
export const paginationMeta = (options, total) => {
|
||||
const start = (options.page - 1) * options.itemsPerPage + 1
|
||||
const end = Math.min(options.page * options.itemsPerPage, total)
|
||||
|
||||
return `${total === 0 ? 0 : start} - ${end} of ${total}`
|
||||
}
|
Reference in New Issue
Block a user