1
0
mirror of https://github.com/misskey-dev/misskey.git synced 2026-05-04 09:35:51 +02:00
This commit is contained in:
syuilo
2025-08-26 17:31:36 +09:00
parent 203296b9cb
commit 69bbac013a
13 changed files with 67 additions and 39 deletions

View File

@@ -684,7 +684,7 @@ export async function cropImageFile(imageFile: File | Blob, options: {
});
}
export function popupMenu(items: MenuItem[], anchorElement?: HTMLElement | EventTarget | null, options?: {
export function popupMenu(items: (MenuItem | null)[], anchorElement?: HTMLElement | EventTarget | null, options?: {
align?: string;
width?: number;
onClosing?: () => void;
@@ -696,7 +696,7 @@ export function popupMenu(items: MenuItem[], anchorElement?: HTMLElement | Event
let returnFocusTo = getHTMLElementOrNull(anchorElement) ?? getHTMLElementOrNull(window.document.activeElement);
return new Promise(resolve => nextTick(() => {
const { dispose } = popup(MkPopupMenu, {
items,
items: items.filter(x => x != null),
anchorElement,
width: options?.width,
align: options?.align,