The main purpose of this class is to build columns to be rendered in the table. It provide various default setting such as label translation, pagination setting, default format for number or date etc. Those setting can be overriden globally so within one app, all tables will use the same setting.
injected LOCALE_ID from angular framework. It is used for default number and date format.
Methods
buildColumns()
Build columns for the table. This method handle column initialization. The options argument is by default taken from PanemuTableService.getColumnOptions()
Get default value for pagination maxRows. Override this method to apply default maxRows app-wide.
Presentation
getPaginationMaxRows(): number;
Returns
number-
default 100
getPaginationMaxRowsLimit()
Limit for pagination maxRows to prevent user entering too big range in pagination input range for example 1-1000. In that case the maxRows is 1000 and it is bigger than the value returned by this method (500 by default). The pagination will fallback to 1-500.
Presentation
getPaginationMaxRowsLimit(): number;
Returns
number-
biggest possible number for pagination maxRows. Default is 500.
Get table state. The state is by default stored in local storage. This method returns an Observable so it can be overriden with http call in case developer save the state in server side. If you override it, ensure to also override PanemuTableService.saveTableState() and PanemuTableService.deleteTableState().