Skip to content

Commit

Permalink
fix(Toolbar): Fixed null exception in Toolbar filter V5
Browse files Browse the repository at this point in the history
  • Loading branch information
tlabaj committed Nov 18, 2024
1 parent 50c26b4 commit 67a2dd3
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/react-core/src/components/Toolbar/ToolbarFilter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,10 @@ class ToolbarFilter extends React.Component<ToolbarFilterProps, ToolbarFilterSta
return (
<React.Fragment>
{showToolbarItem && <ToolbarItem {...props}>{children}</ToolbarItem>}
{ReactDOM.createPortal(chipGroup, chipGroupContentRef.current.firstElementChild)}
{chipGroupContentRef &&
chipGroupContentRef?.current !== null &&
chipGroupContentRef.current?.firstElementChild !== null &&
ReactDOM.createPortal(chipGroup, chipGroupContentRef.current.firstElementChild)}
</React.Fragment>
);
}
Expand Down

0 comments on commit 67a2dd3

Please sign in to comment.