mirror of
https://github.com/ansible/awx.git
synced 2024-11-01 08:21:15 +03:00
Merge pull request #181 from jakemcdermott/page-header-method-names
use 'handle' notation for header toolbar methods
This commit is contained in:
commit
6fe93f474f
@ -28,29 +28,29 @@ class PageHeaderToolbar extends Component {
|
||||
isUserOpen: false,
|
||||
};
|
||||
|
||||
this.onHelpSelect = this.onHelpSelect.bind(this);
|
||||
this.onHelpToggle = this.onHelpToggle.bind(this);
|
||||
this.onUserSelect = this.onUserSelect.bind(this);
|
||||
this.onUserToggle = this.onUserToggle.bind(this);
|
||||
this.handleHelpSelect = this.handleHelpSelect.bind(this);
|
||||
this.handleHelpToggle = this.handleHelpToggle.bind(this);
|
||||
this.handleUserSelect = this.handleUserSelect.bind(this);
|
||||
this.handleUserToggle = this.handleUserToggle.bind(this);
|
||||
}
|
||||
|
||||
onHelpSelect () {
|
||||
handleHelpSelect () {
|
||||
const { isHelpOpen } = this.state;
|
||||
|
||||
this.setState({ isHelpOpen: !isHelpOpen });
|
||||
}
|
||||
|
||||
onUserSelect () {
|
||||
handleUserSelect () {
|
||||
const { isUserOpen } = this.state;
|
||||
|
||||
this.setState({ isUserOpen: !isUserOpen });
|
||||
}
|
||||
|
||||
onHelpToggle (isOpen) {
|
||||
handleHelpToggle (isOpen) {
|
||||
this.setState({ isHelpOpen: isOpen });
|
||||
}
|
||||
|
||||
onUserToggle (isOpen) {
|
||||
handleUserToggle (isOpen) {
|
||||
this.setState({ isUserOpen: isOpen });
|
||||
}
|
||||
|
||||
@ -74,10 +74,10 @@ class PageHeaderToolbar extends Component {
|
||||
isPlain
|
||||
isOpen={isHelpOpen}
|
||||
position={DropdownPosition.right}
|
||||
onSelect={this.onHelpSelect}
|
||||
onSelect={this.handleHelpSelect}
|
||||
toggle={(
|
||||
<DropdownToggle
|
||||
onToggle={this.onHelpToggle}
|
||||
onToggle={this.handleHelpToggle}
|
||||
>
|
||||
<QuestionCircleIcon />
|
||||
</DropdownToggle>
|
||||
@ -113,10 +113,10 @@ class PageHeaderToolbar extends Component {
|
||||
isPlain
|
||||
isOpen={isUserOpen}
|
||||
position={DropdownPosition.right}
|
||||
onSelect={this.onUserSelect}
|
||||
onSelect={this.handleUserSelect}
|
||||
toggle={(
|
||||
<DropdownToggle
|
||||
onToggle={this.onUserToggle}
|
||||
onToggle={this.handleUserToggle}
|
||||
>
|
||||
<UserIcon />
|
||||
User Name
|
||||
|
Loading…
Reference in New Issue
Block a user