React TagBox - Enable Paging

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

  • import React from 'react';
  • import 'devextreme/dist/css/dx.light.css';
  •  
  • import { TagBox } from 'devextreme-react/tag-box';
  • import DataSource from "devextreme/data/data_source";
  •  
  • const dataSource = new DataSource({
  • store: /* A store is configured here */ ,
  • paginate: true,
  • pageSize: 10
  • });
  •  
  • class App extends React.Component {
  • render() {
  • return (
  • <TagBox ...
  • dataSource={dataSource}
  • />
  • );
  • }
  • }
  •  
  • export default App;

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