Skip to content

Paging

The FTPaging component is used to display pagination info at the bottom of a Table.

Usage

Paging contain info on the number of item which are being displayed, as well as some controls to move between pages.

Composition api (script setup)

vue
<script setup lang="ts">
  import { FTPaging } from '@fasttrack-solutions/vue-components-lib';
</script>
<script setup lang="ts">
  import { FTPaging } from '@fasttrack-solutions/vue-components-lib';
</script>

Options api

vue
<script>
  import { FTPaging } from '@fasttrack-solutions/vue-components-lib';
  export default {
    components: {
      FTPaging
    }
  }
</script>
<script>
  import { FTPaging } from '@fasttrack-solutions/vue-components-lib';
  export default {
    components: {
      FTPaging
    }
  }
</script>

Basic usage

INFO

1-513
5 items per page
  • 1
  • 2
  • 3
vue
<script lang="ts" setup>
  import { ref } from 'vue';
  import { FTPaging } from '../components';

  const currentPage = ref(1);
  const pageSize = ref(5);
  const totalItemsCount = ref(100);
</script>
<template>
  <FTPaging
    v-model="currentPage"
    v-model:pageSize="pageSize"
    :totalItemsCount
  />
</template>
<script lang="ts" setup>
  import { ref } from 'vue';
  import { FTPaging } from '../components';

  const currentPage = ref(1);
  const pageSize = ref(5);
  const totalItemsCount = ref(100);
</script>
<template>
  <FTPaging
    v-model="currentPage"
    v-model:pageSize="pageSize"
    :totalItemsCount
  />
</template>

Props

In order to modify the default behavior, FTPaging accepts custom helper props:

NameDefaultDescription
totalItemsCount0Total number of items
pageSize5Number of items per page
modelValue1Current page number
showQuickJumpertrueEnable quick page navigation
simplefalseUse a simplified pagination layout
pagingOptions[5, 10, 25, 50, 100]Available page size options
showPagingOptionsfalseControl the display of paging size options
scrollableContainerSelector'body'Selector for the scrollable container
outsideBoardfalseDisplay pagination controls outside the board