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 showHeader = true;
|
||||||
const footer = () => 'Here is footer';
|
const footer = () => 'Here is footer';
|
||||||
const scroll = { y: 240 };
|
const scroll = { y: 240 };
|
||||||
|
const pagination = { position: 'both' };
|
||||||
|
|
||||||
class Demo extends React.Component {
|
class Demo extends React.Component {
|
||||||
state = {
|
state = {
|
||||||
bordered: false,
|
bordered: false,
|
||||||
loading: false,
|
loading: false,
|
||||||
pagination: true,
|
pagination: false,
|
||||||
size: 'default',
|
size: 'default',
|
||||||
expandedRowRender,
|
expandedRowRender,
|
||||||
title,
|
title,
|
||||||
@ -114,6 +115,10 @@ class Demo extends React.Component {
|
|||||||
this.setState({ scroll: enable ? scroll : undefined });
|
this.setState({ scroll: enable ? scroll : undefined });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
handlePaginationChange = (enable) => {
|
||||||
|
this.setState({ pagination: enable ? pagination : false });
|
||||||
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const state = this.state;
|
const state = this.state;
|
||||||
return (
|
return (
|
||||||
@ -127,7 +132,7 @@ class Demo extends React.Component {
|
|||||||
<Switch checked={state.loading} onChange={this.handleToggle('loading')} />
|
<Switch checked={state.loading} onChange={this.handleToggle('loading')} />
|
||||||
</FormItem>
|
</FormItem>
|
||||||
<FormItem label="Pagination">
|
<FormItem label="Pagination">
|
||||||
<Switch checked={state.pagination} onChange={this.handleToggle('pagination')} />
|
<Switch checked={state.pagination} onChange={this.handlePaginationChange} />
|
||||||
</FormItem>
|
</FormItem>
|
||||||
<FormItem label="Title">
|
<FormItem label="Title">
|
||||||
<Switch checked={!!state.title} onChange={this.handleTitleChange} />
|
<Switch checked={!!state.title} onChange={this.handleTitleChange} />
|
||||||
|
Loading…
Reference in New Issue
Block a user