Skip to content

Groupselect Renderer

Tobias Paczian edited this page Mar 29, 2018 · 4 revisions

image

Provides a select list that allows the selection of one or multiple data items that can be filtered by their attributes. The attribute to be filtered will be displayed as the label in the selection list. Filters can be chained by pressing the enter key in the filter box. The resulting lists can be named and stored in a group list.

options

  • target (HTML Container Element) - Element to render in.
  • data (ARRAY of objects) - The data to display.
  • rows (INT) - The number of rows to display in the select list. Default is 10.
  • sort (BOOLEAN) - Setting this to true will automatically sort the lists by the currently selected filter. Default is false.
  • filter (ARRAY of STRING) - An ordered list of attribute names that are attributes of the objects passed in data that the selection list may be filtered by
  • filter_value (STRING) - Initial value of the filter. Default is ``null`.
  • filter_attribute (STRING) - Initial attribute to be displayed and filtered by. Default is the first element in the filter list.
  • value (STRING) - The attribute of the data objects to be used as the value of the select options.
  • callback (FUNCTION) - The function to be called when the submit button is pressed. This function will pass the values of the selected option(s).
  • groups (HASH of ARRAY of STRING) - Hash of group names pointing to an array of data item ids.
  • synchronous (BOOLEAN) - This is true by default. If set to false, the listselect expects its data to be set, filtered and browsed externally. It will issue a callback to the navigation callback function on any of those events, expecting an external data update.
  • navigation_callback (FUNCTION) - The function to be called when a navigation / filter action is issued and the listselect is in asynchronous state (synchronous set to false). It will be passed either a string (more, reset) or an object that can contain one of the following structures:
    { query: [ { searchword: $filter_value, field: $column_name_to_search, comparison: $comparison_operator }, ... ] }
    { limit: $number_of_rows_per_page }
  • asynch_limit (INTEGER) - The number of items initially loaded in asynchronous mode, default is 100.
  • asynch_filter_min_length (INTEGER) - The number of characters that need to be entered into the filter before the filter callback is performed. Default is 3.

Clone this wiki locally