Created
August 17, 2015 17:15
-
-
Save gregturn/730dd9f96ca2dc1067b4 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| render: function () { | |
| var employees = this.props.employees.map(employee => | |
| <Employee key={employee._links.self.href} | |
| headers={response.headers} | |
| employee={response.entity} | |
| attributes={this.props.attributes} | |
| onUpdate={this.props.onUpdate} | |
| onDelete={this.props.onDelete}/> | |
| ) | |
| ); | |
| var navLinks = []; | |
| if ("first" in this.props.links) { | |
| navLinks.push(<button key="first" onClick={this.handleNavFirst}><<</button>); | |
| } | |
| if ("prev" in this.props.links) { | |
| navLinks.push(<button key="prev" onClick={this.handleNavPrev}><</button>); | |
| } | |
| if ("next" in this.props.links) { | |
| navLinks.push(<button key="next" onClick={this.handleNavNext}>></button>); | |
| } | |
| if ("last" in this.props.links) { | |
| navLinks.push(<button key="last" onClick={this.handleNavLast}>>></button>); | |
| } | |
| return ( | |
| <div> | |
| <input ref="pageSize" defaultValue={this.props.pageSize} onInput={this.handleInput}/> | |
| <table> | |
| <tr> | |
| <th>First Name</th> | |
| <th>Last Name</th> | |
| <th>Description</th> | |
| <th></th> | |
| </tr> | |
| {employees} | |
| </table> | |
| <div> | |
| {navLinks} | |
| </div> | |
| </div> | |
| ) | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment