Web:Client:InfoPanel: fix context menu into room

This commit is contained in:
TimofeyBoyko 2022-11-10 10:55:30 +03:00
parent b999f6dbc5
commit 9adfa5c9d9
2 changed files with 3 additions and 2 deletions

View File

@ -46,7 +46,7 @@ class ContextHelper {
}
}
if (this.selection?.isSelectedFolder) {
if (this.selection?.isSelectedFolder && !this.selection?.isRoom) {
excludeOptionsIntoFolder.forEach((excludeOption) => {
const idx = options.findIndex((o) => o === excludeOption);
if (idx !== -1) options.splice(idx, 1);

View File

@ -47,10 +47,11 @@ const ItemContextOptions = ({
}, [selection]);
const options = contextHelper.getItemContextOptions();
const getData = () => options;
return (
<StyledItemContextOptions onClick={() => setBufferSelection(selection)}>
<StyledItemContextOptions>
<ContextMenu
ref={contextMenuRef}
getContextModel={getData}