diff --git a/src/components/basic_table/collapsed_item_actions.tsx b/src/components/basic_table/collapsed_item_actions.tsx index 89c2f6c2d72..cf1b0363de2 100644 --- a/src/components/basic_table/collapsed_item_actions.tsx +++ b/src/components/basic_table/collapsed_item_actions.tsx @@ -67,10 +67,11 @@ export class CollapsedItemActions extends Component< }); }; - registerPopoverDiv = (popoverDiv: HTMLDivElement) => { + registerPopoverDiv = (popoverDiv: HTMLDivElement | null) => { if (!this.popoverDiv) { this.popoverDiv = popoverDiv; - this.popoverDiv.addEventListener('focusout', this.onPopoverBlur); + this.popoverDiv && + this.popoverDiv.addEventListener('focusout', this.onPopoverBlur); } }; diff --git a/upcoming_changelogs/6145.md b/upcoming_changelogs/6145.md new file mode 100644 index 00000000000..2f01be8f708 --- /dev/null +++ b/upcoming_changelogs/6145.md @@ -0,0 +1,4 @@ +**Bug fixes** + +- Fixed `CollapsedItemActions` ref callback not accounting for `null` value +