Merge pull request #1010 from ONLYOFFICE/bugfix/remove-pin-unpin-from-context-menu

Web:Client:InfoPanel: fix context menu into room
This commit is contained in:
Nikita Gopienko 2022-11-10 11:11:36 +03:00 committed by GitHub
commit 12deaca7e0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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}