menu class
Shows a left-side menu.
Methods¶
__init__() ¶
__init__(
lov=None,
adapter=None, # lambda x: str(x)
type=None, # Type name of the first lov element
label=None,
inactive_ids=None,
width="15vw",
on_action=None,
active=True,
) -> None
Create a new menu
element.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
lov |
Union[str,list[Union[str,Icon,Any]]]
|
The list of menu option values. |
None
|
adapter |
Union[str, Callable]
|
A function or the name of the function that transforms an element of lov into a tuple(id:str, label:Union[str,Icon]). |
lambda x: str(x)
|
type |
str
|
This property is required if lov contains a non-specific type of data (e.g., a dictionary).
The default value is the type of the first element in lov. |
Type name of the first lov element
|
label |
str
|
The title of the menu. |
None
|
inactive_ids |
Union[str,list[str]]
|
Semicolon (';')-separated list or a list of menu items identifiers that are disabled. |
None
|
width |
str
|
The width of the menu when unfolded, in CSS units. |
15vw
|
on_action |
Union[str, Callable]
|
A function or the name of a function that is triggered when a menu option is selected.
|
None
|
active |
bool
|
Indicates if this component is active. |
True
|