mirror of
https://github.com/ant-design/ant-design.git
synced 2024-11-25 03:29:59 +08:00
docs: Add Table pagination position to demo
This commit is contained in:
parent
ae2990e241
commit
a4fea8f22c
@ -65,12 +65,13 @@ const title = () => 'Here is title';
|
||||
const showHeader = true;
|
||||
const footer = () => 'Here is footer';
|
||||
const scroll = { y: 240 };
|
||||
const pagination = { position: 'both' };
|
||||
|
||||
class Demo extends React.Component {
|
||||
state = {
|
||||
bordered: false,
|
||||
loading: false,
|
||||
pagination: true,
|
||||
pagination: false,
|
||||
size: 'default',
|
||||
expandedRowRender,
|
||||
title,
|
||||
@ -114,6 +115,10 @@ class Demo extends React.Component {
|
||||
this.setState({ scroll: enable ? scroll : undefined });
|
||||
}
|
||||
|
||||
handlePaginationChange = (enable) => {
|
||||
this.setState({ pagination: enable ? pagination : false });
|
||||
}
|
||||
|
||||
render() {
|
||||
const state = this.state;
|
||||
return (
|
||||
@ -127,7 +132,7 @@ class Demo extends React.Component {
|
||||
<Switch checked={state.loading} onChange={this.handleToggle('loading')} />
|
||||
</FormItem>
|
||||
<FormItem label="Pagination">
|
||||
<Switch checked={state.pagination} onChange={this.handleToggle('pagination')} />
|
||||
<Switch checked={state.pagination} onChange={this.handlePaginationChange} />
|
||||
</FormItem>
|
||||
<FormItem label="Title">
|
||||
<Switch checked={!!state.title} onChange={this.handleTitleChange} />
|
||||
|
Loading…
Reference in New Issue
Block a user