React TagBox - Enable Paging
Paging properties are set in the DataSource: paginate enables paging; pageSize specifies how many data items a page should contain.
Code
- import React from 'react';
- import 'devextreme/dist/css/dx.fluent.blue.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
- });
- export default function App() {
- return (
- <TagBox ...
- dataSource={dataSource}
- />
- );
- }
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
- Data Binding: Web API and MongoDB | OData Service | Custom Sources | JavaScript Array
- TagBox Demos