类型“ {}”中缺少属性“ containerComponent”

时间:2019-01-14 14:37:00

标签: reactjs devexpress paging

我正在使用react来呈现HTML,而我正在使用react-grid中的PagingPanel Plugin
但是,当我添加此规则时:

import { PagingPanel } from '@devexpress/dx-react-grid';

然后在我的render()中添加以下规则:

<PagingPanel />

它给我以下错误:

Type '{}' is not assignable to type 'PagingPanelProps'.
Property 'containerComponent' is missing in type '{}'.

我想念什么?
我也在PagingPanel的{​​{1}}组件内使用grid

我在react-grid方法中的代码:

render

1 个答案:

答案 0 :(得分:0)

查看有关此组件here的文档

如果您不提供自定义组件,则希望使用其中一个主题组件中的PagingPanel

节选:

// Use the following statement to import a plugin with embedded theme components:

import { PagingPanel } from '@devexpress/dx-react-grid-material-ui';
import { PagingPanel } from '@devexpress/dx-react-grid-bootstrap4';
import { PagingPanel } from '@devexpress/dx-react-grid-bootstrap3';

// If you want to use custom components, you can import the themeless plugin:

import { PagingPanel } from '@devexpress/dx-react-grid';