Skip to content

Commit

Permalink
ST-11801 feat remove deprecated filter (#192)
Browse files Browse the repository at this point in the history
  • Loading branch information
Ima-Acikima authored Jul 19, 2024
1 parent 4b7676a commit cda6095
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions src/navigation/components/Paginate.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
</slot>
<div class="w-full flex md:flex-1 items-center justify-end">
<div v-if="showItemInterval">
{{ pagination.from || 0 | toFullNumber }} -
{{ pagination.to || 0 | toFullNumber }} of
{{ pagination.total | toFullNumber }}
{{ toFullNumber(pagination.from || 0) }} -
{{ toFullNumber(pagination.to || 0) }} of
{{ toFullNumber(pagination.total) }}
</div>
<div class="btn-group ml-2">
<button
Expand Down Expand Up @@ -116,6 +116,13 @@ export default {
perPage: this.perPage,
});
},
toFullNumber(value) {
if (value === undefined || value === null) {
return 0;
}
value = parseInt(value, 10);
return value.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g, "$1,");
},
},
};
</script>

0 comments on commit cda6095

Please sign in to comment.