Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UI: Fix collapse all functionality #26966

Open
wants to merge 1 commit into
base: next
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 2 additions & 1 deletion code/ui/manager/src/container/Menu.tsx
Expand Up @@ -6,6 +6,7 @@ import type { API, State } from '@storybook/manager-api';
import { shortcutToHumanString } from '@storybook/manager-api';
import { styled, useTheme } from '@storybook/theming';
import { CheckIcon, InfoIcon, ShareAltIcon, WandIcon } from '@storybook/icons';
import { STORIES_COLLAPSE_ALL } from '@storybook/core-events';

const focusableUIElements = {
storySearchField: 'storybook-explorer-searchfield',
Expand Down Expand Up @@ -222,7 +223,7 @@ export const useMenu = (
() => ({
id: 'collapse',
title: 'Collapse all',
onClick: () => api.collapseAll(),
onClick: () => api.emit(STORIES_COLLAPSE_ALL),
right: enableShortcuts ? <Shortcut keys={shortcutKeys.collapseAll} /> : null,
}),
[api, enableShortcuts, shortcutKeys]
Expand Down