Show tooltip when no plugins are selected
Summary: Shows tooltip when no plugins are selected. Before it used to select all the plugins Reviewed By: jknoxville Differential Revision: D19537054 fbshipit-source-id: 567b90f981a2a2ddcf68a1dce902db0a9d6214d2
This commit is contained in:
committed by
Facebook Github Bot
parent
dc60d33b3a
commit
f61d578b26
@@ -17,6 +17,7 @@ import {
|
||||
Checkbox,
|
||||
colors,
|
||||
View,
|
||||
Tooltip,
|
||||
} from '../ui';
|
||||
import React, {Component} from 'react';
|
||||
|
||||
@@ -169,9 +170,22 @@ export default class ListView extends Component<Props, State> {
|
||||
<Button compact padded onClick={this.props.onHide}>
|
||||
Close
|
||||
</Button>
|
||||
<Button compact padded type="primary" onClick={onSubmit}>
|
||||
Submit
|
||||
</Button>
|
||||
<Tooltip
|
||||
title={
|
||||
this.state.selectedElements.size <= 0
|
||||
? `Please select atleast one plugin`
|
||||
: null
|
||||
}
|
||||
options={{position: 'toRight'}}>
|
||||
<Button
|
||||
compact
|
||||
padded
|
||||
type="primary"
|
||||
onClick={onSubmit}
|
||||
disabled={this.state.selectedElements.size <= 0}>
|
||||
Submit
|
||||
</Button>
|
||||
</Tooltip>
|
||||
</FlexRow>
|
||||
</Padder>
|
||||
)}
|
||||
|
||||
Reference in New Issue
Block a user