Skip to content

Commit

Permalink
fix: ProfileExplorer kebab dropdown stays open even after clicking ou…
Browse files Browse the repository at this point in the history
…tside
  • Loading branch information
starpit committed Oct 18, 2022
1 parent 6d1efc6 commit 568e9e4
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion plugins/plugin-codeflare/src/components/ProfileExplorer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -297,14 +297,18 @@ class ProfileCard extends React.PureComponent<ProfileCardProps, ProfileCardState
/** Toggle kebab menu open/closed */
private readonly _onKebabToggle = () => this.setState((curState) => ({ isKebabOpen: !curState.isKebabOpen }))

/** Set kebab menu closed */
private readonly _onKebabClose = () => this.setState(() => ({ isKebabOpen: false }))

private actions() {
return (
<React.Fragment>
<Dropdown
onBlur={this._onKebabClose}
isOpen={this.state.isKebabOpen}
isPlain
position="right"
toggle={<KebabToggle onToggle={this._onKebabToggle} />}
toggle={<KebabToggle id="codeflare--profile-explorer-kebab" onToggle={this._onKebabToggle} />}
dropdownItems={this.actionItems}
></Dropdown>
</React.Fragment>
Expand Down

0 comments on commit 568e9e4

Please sign in to comment.