HtmlSelect Module

class epyk.core.html.HtmlSelect.Lookup(page: PageModel, records: list, html_code: Optional[str], width: tuple, height: tuple, profile: Optional[Union[bool, dict]], multiple: bool, options: Optional[dict])
class epyk.core.html.HtmlSelect.Optgroup(page: PageModel, data: list, label: str)
class epyk.core.html.HtmlSelect.Option(page: PageModel, value, text: str, icon: Optional[str], selected: bool, options: Optional[dict] = None)
class epyk.core.html.HtmlSelect.Select(page: PageModel, records: list, html_code: str, width: tuple, height: tuple, profile: Optional[Union[bool, dict]], multiple: bool, options: Optional[dict])
ajax(url: str, js_data="function (){return {q: '{{{q}}}'}}", is_json: bool = True, method: str = 'POST', options: Optional[dict] = None)

Create a AJAX request.

Related Pages:

Parameters:
  • url – The request URL for the ajax call

  • js_data – Optional. The value of the item to be removed from the list

  • is_json – Optional. A flag to specific if the data are json (default True)

  • method – Optional. The HTTP request method. Default Post

  • options – Optional. The specific properties for the ajax request

change(js_funcs: Union[List[Union[str, JsDataModel]], str], empty_funcs: Optional[Union[List[Union[str, JsDataModel]], str]] = None, profile: Optional[Union[bool, dict]] = None, source_event: Optional[str] = None, on_ready: bool = False)

Javascript event triggered when the value has changed.

Parameters:
  • js_funcs – Set of Javascript function to trigger on this event.

  • empty_funcs – Optional. Set of Js function to trigger if the value is empty.

  • profile – Optional. A flag to set the component performance storage.

  • source_event – Optional. The JavaScript DOM source for the event (can be a sug item).

  • on_ready – Optional. Specify if the event needs to be trigger when the page is loaded.

property data

Property to the underlying data from the select.

property dom: DomSelect

Return all the Javascript functions defined for an HTML Component.

Those functions will use plain javascript by default.

Returns:

A Javascript Dom object

property js: JSelect

Return all the Javascript functions defined for an HTML Component.

Those functions will use plain javascript by default.

Related Pages:

Returns:

A Javascript Dom object

property options: OptionsSelectJs

Property to set all the possible object for a button.

property parsers

Set of functions to parse the data.

property style: ClassSelect

A property to the CSS style of the DOM component.

Each component will have default CSS style but they can be overridden.

class epyk.core.data.DataPy.SelectionBox
static from_df(df, column: str, all_checked: bool = False, apply_sort: bool = False, with_count: bool = False) List[dict]

Usage:

:param df:
:param column:
:param all_checked:
:param apply_sort:
:param with_count:
static from_dict(values, all_checked: bool = False) List[dict]

Usage:

:param values:
:param all_checked:
static from_list(values: List[str], all_checked: bool = False, apply_sort: bool = False, with_count: bool = False) List[dict]

Usage:

:param values:
:param all_checked:
:param apply_sort:
:param with_count:
static from_records(records: List[dict], column: str, apply_sort: bool = False, with_count: bool = False) List[dict]

Usage:

:param records:
:param column:
:param apply_sort:
:param with_count: