mirror of
https://github.com/hcengineering/platform.git
synced 2026-09-22 01:25:00 +02:00
Cards fixes (#8003)
Signed-off-by: Denis Bykhov <bykhov.denis@gmail.com>
This commit is contained in:
@@ -35,6 +35,8 @@
|
||||
|
||||
export let selection: number | undefined = undefined
|
||||
|
||||
export let onContextMenu: ((ev: MouseEvent, object: Doc) => void) | undefined
|
||||
|
||||
const client = getClient()
|
||||
const hierarchy = client.getHierarchy()
|
||||
|
||||
@@ -62,8 +64,13 @@
|
||||
|
||||
const showContextMenu = async (ev: MouseEvent, object: Doc, row: number): Promise<void> => {
|
||||
selection = row
|
||||
const items = object
|
||||
showMenu(ev, { object: items, baseMenuClass })
|
||||
ev.stopPropagation()
|
||||
ev.preventDefault()
|
||||
if (onContextMenu !== undefined) {
|
||||
onContextMenu(ev, object)
|
||||
} else {
|
||||
showMenu(ev, { object, baseMenuClass })
|
||||
}
|
||||
}
|
||||
|
||||
function onRow (object: Doc): void {
|
||||
|
||||
Reference in New Issue
Block a user