Select Button Conditional
This commit is contained in:
1 parent
9427949902
commit
e92b9dfcfd
1 file changed
+17
-3
@@ -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>
|
||||
|
||||
Reference in new issue
Block a user