Module DataList

Component to manage data for huge dataset in scroll.

It requires Druid Scroll and Druid Grid (Static or Dynamic) components

Functions

clear(self) Clear the DataList and refresh visuals
get_first_index(self) Return first index from data.
get_index(self, data) Return index for data value
get_last_index(self) Return last index from data
get_length(self) Return amount of data
init(self, scroll, grid, create_function) Data list constructor
on_remove(self) Druid System on_remove function
scroll_to_index(self, index) Instant scroll to element with passed index
set_data(self, data) Set new data set for DataList component

Fields

grid The Druid Grid component
last_index The current visual last data index
on_scroll_progress_change Event triggered when scroll progress is changed; event(self, progress_value)
scroll The Druid scroll component
scroll_progress The current progress of scroll posititon
top_index The current visual top data index


Functions

clear(self)
Clear the DataList and refresh visuals

Parameters:

get_first_index(self)
Return first index from data. It not always equals to 1

Parameters:

get_index(self, data)
Return index for data value

Parameters:

get_last_index(self)
Return last index from data

Parameters:

get_length(self)
Return amount of data

Parameters:

init(self, scroll, grid, create_function)
Data list constructor

Parameters:

  • self DataList DataList
  • scroll Scroll The Scroll instance for Data List component
  • grid StaticGrid or DynamicGrid The StaticGrid or DynamicGrid instance for Data List component
  • create_function function The create function callback(self, data, index, data_list). Function should return (node, [component])
on_remove(self)
Druid System on_remove function

Parameters:

scroll_to_index(self, index)
Instant scroll to element with passed index

Parameters:

set_data(self, data)
Set new data set for DataList component

Parameters:

Returns:

    druid.data_list Current DataList instance

Fields

grid
The Druid Grid component
last_index
The current visual last data index
  • last_index number
on_scroll_progress_change
Event triggered when scroll progress is changed; event(self, progress_value)
scroll
The Druid scroll component
scroll_progress
The current progress of scroll posititon
  • scroll_progress number
top_index
The current visual top data index
  • top_index number
generated by LDoc 1.4.6 Last updated 2022-03-11 20:55:29