Type Alias TJSContextMenuItemData
TJSContextMenuItemData : {
class?: Function;
condition?: boolean | (() => boolean);
icon?: string;
image?: string;
imageAlt?: string;
label?: string;
onPress?: ((item: TJSContextMenuItemData, object: any) => void);
props?: object;
separator?: "hr";
}
class?: Function;
condition?: boolean | (() => boolean);
icon?: string;
image?: string;
imageAlt?: string;
label?: string;
onPress?: ((item: TJSContextMenuItemData, object: any) => void);
props?: object;
separator?: "hr";
}
Type declaration
Optional
class?: FunctionA Svelte component class.
Optional
condition?: boolean | (() => boolean)If a boolean and false or a function that invoked returns a falsy value this item is not added.
Optional
icon?: stringA string containing icon classes.
Optional
image?: stringAn image icon path.
Optional
imageAlt ?: stringAn image 'alt' text description.
Optional
label?: stringA text string that is passed through localization.
Optional
onPress ?: ((item: TJSContextMenuItemData, object: any) => void)A callback function that receives the selected item data and an object containing the A11yFocusSource data that can be passed to any Application / particularly modal dialogs returning focus when closed.
- (item, object): void
Parameters
- item: TJSContextMenuItemData
- object: any
Returns void
Optional
props?: objectAn object passed on as props for any Svelte component.
Optional
separator?: "hr"A menu item separator; only 'hr' supported.
Defines a menu item entry. Depending on the item data that is passed into the menu you can define 4 types of items: 'icon / label', 'image / label', 'class / Svelte component', and 'separator / hr'. A single callback function
onPress
is supported.