ezqms-1028: fix actions in tree element (#5887)

Signed-off-by: Alexey Zinoviev <alexey.zinoviev@xored.com>
This commit is contained in:
Alexey Zinoviev 2024-06-21 12:40:51 +04:00 committed by GitHub
parent a27075b29e
commit ece5c0ec6c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -58,10 +58,12 @@
let inlineActions: Action[] = []
let popupMenuActions: Action[] = []
$: actions().then((result) => {
inlineActions = result.filter((action) => action.inline === true)
popupMenuActions = result.filter((action) => action.inline !== true)
})
$: if (actions !== undefined) {
actions().then((result) => {
inlineActions = result.filter((action) => action.inline === true)
popupMenuActions = result.filter((action) => action.inline !== true)
})
}
async function onMenuClick (ev: MouseEvent): Promise<void> {
// Read actual popup actions on open as visibility might have been changed