Skip to content

Commit

Permalink
Merge pull request #1616 from merico-dev/fix-bug-in-nested-panel-addon
Browse files Browse the repository at this point in the history
fix(dashboard): avoid render PanelVizAddons in ClientPanelRender
  • Loading branch information
GerilLeto authored Feb 17, 2025
2 parents 6a81b57 + 4f25f59 commit fdd8eec
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion dashboard/src/components/panel/panel-render/viz/viz.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,9 @@ export const PanelVizAddons = () => {
const instance = sl.getRequired(tokens.instanceScope.vizInstance);
const { inEditMode } = useContext(LayoutStateContext);
const addonManager = sl.getRequired(tokens.panelAddonManager);
const { withAddon } = usePanelVizFeatures();
const panelRoot = usePanelAddonSlot();
if (!panelRoot) {
if (!panelRoot || !withAddon) {
return null;
}
return createPortal(
Expand Down

0 comments on commit fdd8eec

Please sign in to comment.