Skip to content

Commit 568e9e4

Browse files
committed
fix: ProfileExplorer kebab dropdown stays open even after clicking outside
1 parent 6d1efc6 commit 568e9e4

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Diff for: plugins/plugin-codeflare/src/components/ProfileExplorer.tsx

+5-1
Original file line numberDiff line numberDiff line change
@@ -297,14 +297,18 @@ class ProfileCard extends React.PureComponent<ProfileCardProps, ProfileCardState
297297
/** Toggle kebab menu open/closed */
298298
private readonly _onKebabToggle = () => this.setState((curState) => ({ isKebabOpen: !curState.isKebabOpen }))
299299

300+
/** Set kebab menu closed */
301+
private readonly _onKebabClose = () => this.setState(() => ({ isKebabOpen: false }))
302+
300303
private actions() {
301304
return (
302305
<React.Fragment>
303306
<Dropdown
307+
onBlur={this._onKebabClose}
304308
isOpen={this.state.isKebabOpen}
305309
isPlain
306310
position="right"
307-
toggle={<KebabToggle onToggle={this._onKebabToggle} />}
311+
toggle={<KebabToggle id="codeflare--profile-explorer-kebab" onToggle={this._onKebabToggle} />}
308312
dropdownItems={this.actionItems}
309313
></Dropdown>
310314
</React.Fragment>

0 commit comments

Comments
 (0)