pysepal.sepalwidgets.app.DrawerItem#
- class pysepal.sepalwidgets.app.DrawerItem(*args, **kwargs)[source]#
Custom DrawerItem using the user input.
If a card is set the drawerItem will trigger the display of all the Tiles in the app that have the same mount_id. If an href is set, the drawer will open the link in a new tab.
- Parameters:
title (str) – the title of the drawer item
icon (str) – the full name of a mdi/fa icon
card (str) – the mount_id of tiles in the app
href (str) – the absolute link to an external web page
model (Model | None) – sepalwidget model where is defined the bin_var trait
bind_var (str) – required when model is selected. Trait to link with ‘alert’ self trait parameter
kwargs (optional) – any parameter from a v.ListItem. If set, ‘_metadata’, ‘target’, ‘link’ and ‘children’ will be overwritten.
Attributes
add_notifalertTrait to control visibility of an alert in the drawer item
alert_badgered circle to display in the drawer
childrenAn instance of a Python list.
hrefA trait type representing a Union type.
input_valueA trait which allows any value.
linkA boolean (True, False) trait.
resizeAn int trait.
targetA trait for unicode strings.
template_fileA trait for unicode strings.
tilesthe cards of the application
Methods
Custom DrawerItem using the user input.
Display the appropriate tiles when the item is clicked.
Remove notification alert.
Display the appropriate tiles when the item is clicked.
- DrawerItem.__init__(title, icon='', card='', href='', model=None, bind_var='', **kwargs)[source]#
Custom DrawerItem using the user input.
If a card is set the drawerItem will trigger the display of all the Tiles in the app that have the same mount_id. If an href is set, the drawer will open the link in a new tab.
- Parameters:
title (str) – the title of the drawer item
icon (str) – the full name of a mdi/fa icon
card (str) – the mount_id of tiles in the app
href (str) – the absolute link to an external web page
model (Model | None) – sepalwidget model where is defined the bin_var trait
bind_var (str) – required when model is selected. Trait to link with ‘alert’ self trait parameter
kwargs (optional) – any parameter from a v.ListItem. If set, ‘_metadata’, ‘target’, ‘link’ and ‘children’ will be overwritten.
- Return type:
None