Skip to content

Commit

Permalink
Merge pull request #25825 from storybookjs/norbert/fix-memo-in-ui
Browse files Browse the repository at this point in the history
UI: Fix sidebar top and bottom addons not showing
  • Loading branch information
ndelangen authored Jan 31, 2024
2 parents 00de039 + 5fb747d commit 69fcccd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions code/ui/manager/src/container/Sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@ const Sidebar = React.memo(function Sideber({ onMenuClick }: SidebarProps) {
const bottomItems = api.getElements(Addon_TypesEnum.experimental_SIDEBAR_BOTTOM);
const topItems = api.getElements(Addon_TypesEnum.experimental_SIDEBAR_TOP);
// eslint-disable-next-line react-hooks/exhaustive-deps
const bottom = useMemo(() => Object.values(bottomItems), [...Object.values(bottomItems)]);
const bottom = useMemo(() => Object.values(bottomItems), [Object.keys(bottomItems).join('')]);
// eslint-disable-next-line react-hooks/exhaustive-deps
const top = useMemo(() => Object.values(topItems), [...Object.values(topItems)]);
const top = useMemo(() => Object.values(topItems), [Object.keys(topItems).join('')]);

return {
title: name,
Expand Down

0 comments on commit 69fcccd

Please sign in to comment.