This commit is contained in:
tamaina 2022-01-29 16:52:44 +00:00
parent 32dd3bf842
commit af42693ea1
2 changed files with 3 additions and 2 deletions

View file

@ -82,7 +82,7 @@ watch(() => props.items, () => {
if (item && 'then' in item) { // if item is Promise
items[i] = { type: 'pending' };
item.then(actualItem => {
items[i] = actualItem;
items2[i] = actualItem;
});
}
}

View file

@ -15,5 +15,6 @@ export type MenuButton = { type?: 'button', text: string, icon?: string, indicat
export type MenuPending = { type: 'pending' };
type OuterMenuItem = MenuDivider | MenuNull | MenuLabel | MenuLink | MenuA | MenuUser | MenuSwitch | MenuButton;
export type MenuItem = OuterMenuItem | Promise<OuterMenuItem>;
type OuterPromiseMenuItem = Promise<MenuLabel | MenuLink | MenuA | MenuUser | MenuSwitch | MenuButton>;
export type MenuItem = OuterMenuItem | OuterPromiseMenuItem;
export type InnerMenuItem = MenuDivider | MenuPending | MenuLabel | MenuLink | MenuA | MenuUser | MenuSwitch | MenuButton;