Vue Lookup - Enable Paging

Paging properties are set in the DataSource: paginate enables paging; pageSize specifies how many data items a page should contain.

  • <template>
  • <DxLookup ...
  • :data-source="dataSource"
  • />
  • </template>
  •  
  • <script>
  • import 'devextreme/dist/css/dx.common.css';
  • import 'devextreme/dist/css/dx.light.css';
  •  
  • import { DxLookup } from 'devextreme-vue/lookup';
  • import DataSource from "devextreme/data/data_source";
  •  
  • export default {
  • components: {
  • DxLookup
  • },
  • data() {
  • return {
  • dataSource: new DataSource({
  • store: /* A store is configured here */ ,
  • paginate: true,
  • pageSize: 10
  • })
  • };
  • }
  • }
  • </script>

Lookup renders the next page once a user scrolls the item list to the bottom. If you set the pageLoadMode to "nextButton", Lookup renders the next page when a user clicks the Next button. You can change this button's text using the nextButtonText property:

  • <template>
  • <DxLookup ...
  • page-load-mode="nextButton"
  • next-button-text="More"
  • />
  • </template>
  •  
  • <script>
  • import 'devextreme/dist/css/dx.common.css';
  • import 'devextreme/dist/css/dx.light.css';
  •  
  • import { DxLookup } from 'devextreme-vue/lookup';
  •  
  • export default {
  • components: {
  • DxLookup
  • }
  • }
  • </script>

Local arrays and remote datasets loaded using the CustomStore in raw mode are only rendered page by page. In other cases, remote datasets are also loaded page by page if the server can partition data.

See Also