Browse Source

Set state properly.

feature/bike-tracking
Drew Larson 8 years ago
parent
commit
330d99579a
  1. 5
      bikeshop_project/assets/js/bikes/components/BikeTable/index.jsx

5
bikeshop_project/assets/js/bikes/components/BikeTable/index.jsx

@ -49,6 +49,7 @@ export default class BikeTable extends React.Component {
handleEditBike(bike) { handleEditBike(bike) {
console.log('Bike edit!'); console.log('Bike edit!');
this.setState({ this.setState({
...this.state,
bikeModal: { bikeModal: {
open: true, open: true,
bike, bike,
@ -88,8 +89,8 @@ export default class BikeTable extends React.Component {
<TableBody displayRowCheckbox={false}> <TableBody displayRowCheckbox={false}>
{bikeRows.length ? {bikeRows.length ?
bikeRows : bikeRows :
<TableRow> <TableRow >
<TableRowColumn>{'No members currently signed in.'}</TableRowColumn> <TableRowColumn key="none">{'No bikes found.'}</TableRowColumn>
</TableRow> </TableRow>
} }
</TableBody> </TableBody>

Loading…
Cancel
Save