fix: make context menu scrollable when there's not enough space
This commit is contained in:
@@ -27,6 +27,7 @@ export class NotesState {
|
||||
top: 0,
|
||||
left: 0,
|
||||
};
|
||||
contextMenuMaxHeight: number | 'auto' = 'auto';
|
||||
showProtectedWarning = false;
|
||||
|
||||
constructor(
|
||||
@@ -45,6 +46,7 @@ export class NotesState {
|
||||
|
||||
setContextMenuOpen: action,
|
||||
setContextMenuPosition: action,
|
||||
setContextMenuMaxHeight: action,
|
||||
setShowProtectedWarning: action,
|
||||
unselectNotes: action,
|
||||
});
|
||||
@@ -181,6 +183,10 @@ export class NotesState {
|
||||
this.contextMenuPosition = position;
|
||||
}
|
||||
|
||||
setContextMenuMaxHeight(height: number | 'auto'): void {
|
||||
this.contextMenuMaxHeight = height;
|
||||
}
|
||||
|
||||
async changeSelectedNotes(
|
||||
mutate: (mutator: NoteMutator) => void
|
||||
): Promise<void> {
|
||||
|
||||
Reference in New Issue
Block a user