Skip to content

Commit

Permalink
[misc] move componentDidUpdate fn
Browse files Browse the repository at this point in the history
- move it closer to updateFocus / componentDidMount for easier context between the other two methods
  • Loading branch information
cee-chen committed May 5, 2022
1 parent 89799ea commit a5be54f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/components/context_menu/context_menu_panel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,10 @@ export class EuiContextMenuPanel extends Component<Props, State> {
}
};

componentDidUpdate() {
this.updateFocus();
}

componentDidMount() {
this.updateFocus();
this.reclaimPopoverFocus();
Expand Down Expand Up @@ -413,10 +417,6 @@ export class EuiContextMenuPanel extends Component<Props, State> {
}
}

componentDidUpdate() {
this.updateFocus();
}

panelRef = (node: HTMLElement | null) => {
this.panel = node;

Expand Down

0 comments on commit a5be54f

Please sign in to comment.