the tabulator datastructure
The initialization of tabulator is done by setting the html element to the tabulator library and transfering a configuration object.
The object has the following parts:
- many different configuration parameters
- columns: the cloumn structure describe the layout of the columns
- data: the data of the table
- event functions
How I use tabulator
I load the data by Ajax and use the setdata() function:
All coloumns get a headerfilter. All data columns are sortable. The first column is a html-column for the delete function. The formatter property allows to insert html-data.
The data is loaded after initialization or by entering a key in the header filter.
With each key a request is send to the server. The actual filter is transmitted in the filter array:
The filter is build up in php and the fitting records are send back to the browser.
Tabulator website: tabulator.info
For more details about Tabulator, please have a look to:
The menu is build with the datastructure 'obj' and the function 'displayDropdownel(obj)'. The structure consist out off:
- el_dd, the element
The function displayDropdownel(obj) is part of k8 web kit.
alert(this.dataset.value ? 'value: '+this.dataset.value : 'no value'+', classList: '+this.classList);
The default value "value_selected" is displayed in the button and the pretext "Count" is written in front of it.