Skip to content

Commit

Permalink
fix(Toolbar): Fixed null exception in Toolbar filter (#11227)
Browse files Browse the repository at this point in the history
* fix(Toolbar): Fixed null exception in Toolbar filter

* Updates form review comments
  • Loading branch information
tlabaj authored Nov 20, 2024
1 parent adb27fc commit 76b516e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/react-core/src/components/Toolbar/ToolbarFilter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,8 @@ class ToolbarFilter extends React.Component<ToolbarFilterProps, ToolbarFilterSta
return (
<React.Fragment>
{showToolbarItem && <ToolbarItem {...props}>{children}</ToolbarItem>}
{ReactDOM.createPortal(labelGroup, labelGroupContentRef.current.firstElementChild)}
{labelGroupContentRef?.current?.firstElementChild !== null &&
ReactDOM.createPortal(labelGroup, labelGroupContentRef.current.firstElementChild)}
</React.Fragment>
);
}
Expand Down

0 comments on commit 76b516e

Please sign in to comment.