Select Button Conditional

This commit is contained in:
Luis Fernando Molina committed 2018-09-26 13:50:02 +02:00
1 parent 9427949902
commit e92b9dfcfd
1 file changed
+17 -3
+17 -3
View File
@@ -142,6 +142,22 @@ class UserSearch extends Component {
}
}
selectButton(){
if (this.props.selectButton === true) {
return(
<Button color="primary">
Select
</Button>
)
} else {
return(<div></div>)
}
}
displayUsers(){
let data = this.props.getUsersBySearchFields;
const { classes } = this.props;
@@ -178,9 +194,7 @@ class UserSearch extends Component {
<CardActions>
<Grid container justify="center" spacing={8}>
<Grid item>
<Button color="primary">
Select
</Button>
{this.selectButton()}
</Grid>
</Grid>
</CardActions>