Skip to content
Snippets Groups Projects
Unverified Commit 7480c906 authored by AYUSHKUMAR_21JE0209's avatar AYUSHKUMAR_21JE0209 Committed by GitHub
Browse files

fix: Sidebar RoomMenuaction anomaly in lower size (#35386)

parent 142a9b9a
No related branches found
No related tags found
No related merge requests found
---
'@rocket.chat/meteor': patch
---
Fixes an issue where the room menu inside the sidebar item remains visible when the sidebar is collapsed
import type { RoomType } from '@rocket.chat/core-typings';
import { GenericMenu } from '@rocket.chat/ui-client';
import { useTranslation } from '@rocket.chat/ui-contexts';
import { useLayout, useTranslation } from '@rocket.chat/ui-contexts';
import type { ReactElement } from 'react';
import { memo } from 'react';
......@@ -30,11 +30,21 @@ const RoomMenu = ({
hideDefaultOptions = false,
}: RoomMenuProps): ReactElement | null => {
const t = useTranslation();
const { sidebar } = useLayout();
const isUnread = alert || unread || threadUnread;
const sections = useRoomMenuActions({ rid, type, name, isUnread, cl, roomOpen, hideDefaultOptions });
return <GenericMenu detached className='rcx-sidebar-item__menu' title={t('Options')} mini aria-keyshortcuts='alt' sections={sections} />;
return (
<GenericMenu
detached
className='rcx-sidebar-item__menu'
title={t('Options')}
mini
aria-keyshortcuts='alt'
disabled={sidebar.isCollapsed}
sections={sections}
/>
);
};
export default memo(RoomMenu);
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment