Trees Interface
- class epyk.interfaces.components.CompTrees.Trees(ui)
- dropdown(record: Optional[List[dict]] = None, text: str = '', width: Optional[Union[tuple, int, str]] = (100, '%'), height: Optional[Union[tuple, int, str]] = (None, 'px'), html_code: Optional[str] = None, helper: Optional[str] = None, options: Optional[Union[bool, dict]] = None, profile: Optional[Union[bool, dict]] = None) DropDown
Usage:
Underlying HTML Objects:
Related Pages:
http://getbootstrap.com/docs/4.0/components/dropdowns/ https://www.w3schools.com/bootstrap/tryit.asp?filename=trybs_ref_js_dropdown_multilevel_css&stacked=h https://codepen.io/svnt/pen/beEgre
https://codepen.io/raneio/pen/NbbZEM https://www.w3schools.com/howto/tryit.asp?filename=tryhow_css_js_dropdown_hover https://codepen.io/antoniputra/pen/BzyWmb
- Parameters:
record – Optional. The records
text – Optional. Dropdown label
width – Optional. A tuple with the integer for the component width and its unit
height – Optional. A tuple with the integer for the component height and its unit
html_code – Optional. An identifier for this component (on both Python and Javascript side)
helper – Optional. A tooltip helper
options – Optional. Specific Python options available for this component
profile – Optional. A flag to set the component performance storage
- folder(folder: Optional[str] = None, width: Optional[Union[tuple, int, str]] = (100, '%'), height: Optional[Union[tuple, int, str]] = (None, 'px'), html_code: Optional[str] = None, helper: Optional[str] = None, options: Optional[Union[bool, dict]] = None, profile: Optional[Union[bool, dict]] = None) Tree
Add a tree component from a folder structure.
- Parameters:
folder – The path to be displayed
width – Optional. A tuple with the integer for the component width and its unit
height – Optional. A tuple with the integer for the component height and its unit
html_code – Optional. An identifier for this component (on both Python and Javascript side)
helper – Optional. A tooltip helper
options – Optional. Specific Python options available for this component
profile – Optional. A flag to set the component performance storage
- inputs(data: Optional[List[dict]] = None, width: Optional[Union[tuple, int, str]] = (100, '%'), height: Optional[Union[tuple, int, str]] = (None, 'px'), html_code: Optional[str] = None, helper: Optional[str] = None, options: Optional[Union[bool, dict]] = None, profile: Optional[Union[bool, dict]] = None) TreeInput
Usage:
Underlying HTML Objects:
- Parameters:
data – Optional. The records
width – Optional. A tuple with the integer for the component width and its unit
height – Optional. A tuple with the integer for the component height and its unit
html_code – Optional. An identifier for this component (on both Python and Javascript side)
helper – Optional. A tooltip helper
options – Optional. Specific Python options available for this component
profile – Optional. A flag to set the component performance storage
- tree(data: Optional[List[dict]] = None, width: Optional[Union[tuple, int, str]] = (100, '%'), height: Optional[Union[tuple, int, str]] = (None, 'px'), html_code: Optional[str] = None, helper: Optional[str] = None, options: Optional[Union[bool, dict]] = None, profile: Optional[Union[bool, dict]] = None) Tree
Addd a tree / hierarchy component to the page.
Usage:
data = [{"value": 'test', 'items': [{"value": 'child 1', 'color': 'red'}]}] page.ui.lists.tree(data) data = [{"value": 'test', 'icon': "fas fa-check", "css": {'color': 'green'}, 'items': [{ "value": 'child 1', "css": {'color': 'red'}, 'icon': "fas fa-times"}]}, {"value": 'test 2', 'icon': "fas fa-exclamation-triangle", "css": {'color': 'orange'}, 'items': [{ "value": 'child 1', "css": {'color': 'red'}, 'icon': "fas fa-times"}], }] hyr = page.ui.tree(data) hyr.options.icon_close = "fas fa-caret-right" hyr.options.icon_open = "fas fa-caret-down" hyr.options.with_badge = True hyr.options.with_icon = "icon" hyr.click_node([page.js.alert(pk.events.value)]) hyr.click([page.js.alert(pk.events.value)])
Underlying HTML Objects:
Templates:
- Parameters:
data – Optional. The records
width – Optional. A tuple with the integer for the component width and its unit
height – Optional. A tuple with the integer for the component height and its unit
html_code – Optional. An identifier for this component (on both Python and Javascript side)
helper – Optional. A tooltip helper
options – Optional. Specific Python options available for this component
profile – Optional. A flag to set the component performance storage