属性 'containerComponent' 在类型“{}”中缺失
Property 'containerComponent' is missing in type '{}'
我正在使用 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 '{}'.
我错过了什么?
我也在 react-grid
的 grid
组件中使用 PagingPanel
我在 render
方法中的代码:
<Grid rows={this.props.ConnectedConnectors}
columns={[{ name: "guid", title: "Guid" }]}>
<SortingState sorting={this.props.sorting} onSortingChange={this.props.changeSorting} />
<SearchState value={this.props.searchValue} onValueChange={this.props.changeSearchValue} />
<IntegratedFiltering />
<IntegratedSorting />
<PagingState pageSize={10} currentPage={this.props.pageNumber} onCurrentPageChange={this.props.changePageNumber} />
<IntegratedPaging />
<Table cellComponent={this.renderCell.bind(this)} columnExtensions={this.tableColumnExtensions} tableComponent={TableComponent} />
<Toolbar />
<SearchPanel />
<TableHeaderRow showSortingControls />
<TableColumnVisibility hiddenColumnNames={hiddenColumnNames} emptyMessageComponent={NoGridColumnsMessage} />
<PagingPanel /> // the one with the error mark
<SelectionState />
<TableSelection selectByRowClick highlightRow showSelectionColumn={false} key="id" />
</Grid>
查看有关此组件的文档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';
我正在使用 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 '{}'.
我错过了什么?
我也在 react-grid
grid
组件中使用 PagingPanel
我在 render
方法中的代码:
<Grid rows={this.props.ConnectedConnectors}
columns={[{ name: "guid", title: "Guid" }]}>
<SortingState sorting={this.props.sorting} onSortingChange={this.props.changeSorting} />
<SearchState value={this.props.searchValue} onValueChange={this.props.changeSearchValue} />
<IntegratedFiltering />
<IntegratedSorting />
<PagingState pageSize={10} currentPage={this.props.pageNumber} onCurrentPageChange={this.props.changePageNumber} />
<IntegratedPaging />
<Table cellComponent={this.renderCell.bind(this)} columnExtensions={this.tableColumnExtensions} tableComponent={TableComponent} />
<Toolbar />
<SearchPanel />
<TableHeaderRow showSortingControls />
<TableColumnVisibility hiddenColumnNames={hiddenColumnNames} emptyMessageComponent={NoGridColumnsMessage} />
<PagingPanel /> // the one with the error mark
<SelectionState />
<TableSelection selectByRowClick highlightRow showSelectionColumn={false} key="id" />
</Grid>
查看有关此组件的文档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';