fix: make context menu scrollable when there's not enough space

This commit is contained in:
Antonella Sgarlatta
2021-05-20 13:29:59 -03:00
parent eea4f98928
commit f9f2959ad5
3 changed files with 51 additions and 9 deletions

View File

@@ -31,8 +31,8 @@ const NotesContextMenu = observer(({ appState }: Props) => {
return appState.notes.contextMenuOpen ? (
<div
ref={contextMenuRef}
className="sn-dropdown max-w-80 flex flex-col py-2"
style={{ position: 'absolute', ...appState.notes.contextMenuPosition }}
className="sn-dropdown max-w-80 flex flex-col py-2 overflow-y-scroll absolute"
style={{ ...appState.notes.contextMenuPosition, maxHeight: appState.notes.contextMenuMaxHeight }}
>
<NotesOptions
appState={appState}