mirror of
https://github.com/chaoticbackup/chaoticbackup.github.io.git
synced 2026-04-13 20:35:51 -05:00
added button navigation
This commit is contained in:
parent
8e1eaf6f7a
commit
1334bd65ff
File diff suppressed because one or more lines are too long
|
|
@ -83,6 +83,7 @@ export default class CollectionHome extends React.Component {
|
|||
<hr />
|
||||
{this.navigation()}<br />
|
||||
{output()}
|
||||
{this.navigation()}<br />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
|
@ -341,19 +342,17 @@ export default class CollectionHome extends React.Component {
|
|||
else return(<button disabled>prev</button>);
|
||||
}
|
||||
|
||||
let entries = (event) => {
|
||||
let x = event.target.value;
|
||||
if (!isNaN(x)) {
|
||||
this.n=x;
|
||||
}
|
||||
}
|
||||
|
||||
return (
|
||||
<div style={{textAlign: 'left'}}>
|
||||
<p>Showing page {this.p} of {numpages} {prev()} {next()}</p>
|
||||
<p>
|
||||
Entries per page:
|
||||
<input type="text" style={{width: '40px'}} value={this.n} onChange={entries} />
|
||||
Entries per page: {this.n}
|
||||
{/*<input type="text" style={{width: '40px'}} value={this.n}
|
||||
onChange={(event) => {let x = event.target.value; if (!isNaN(x)) this.n=x;}
|
||||
/>*/}
|
||||
<input type="button" value="10" onClick={(e) => this.n=e.target.value} />
|
||||
<input type="button" value="20" onClick={(e) => this.n=e.target.value} />
|
||||
<input type="button" value="50" onClick={(e) => this.n=e.target.value} />
|
||||
</p>
|
||||
</div>
|
||||
);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user