type of the trigger payload to be used in the underlying fetch
function, for example a form output
type of the output data for the table. This must match MatTable's generic type
The initialIsLoading
param sets the initial value for isLoading$.
If your fetching (read: loading) starts in start and the initial value for isLoading$ is false
,
you will get an ExpressionChangedAfterItHasBeenCheckedError
! Use this parameter to prevent this error.
the initial value for isLoading$
Class of the Mediator to use
array of column ids. Has to match the keys of your data interface
Observable for the current loading status. Will be pre-initialised in the constructor,
to prevent ExpressionChangedAfterItHasBeenCheckedError
the mediator instance, initialised in the initMediator()
method
Class of the Mediator to use
the config object for the mediator
Queried @ViewChild
paginator, may be undefined
if no paginator is in the template
Queried @ViewChild
sort directive, may be undefined
if no sort is in the template
Queried @ViewChild
table element
trigger$
Observable of type <F>
. Defaults to immediately emitting undefined
, via of
The fetch method that will be used by the mediator
the latest payload of the trigger$ observable
the current column id that is sorted by
the current sort direction
the current page index
the current page size
Initialises the mediator instance.
By default this will be called automatically with the ngAfterViewInit
method.
It sets this.isLoading$
observable to the mediator.isLoading$
observable.
Wrapper to initialise the mediator in an async fashion.
This may be used to prevent ExpressionChangedAfterItHasBeenCheckedError
in some cases.
Overwrite the ngAfterViewInit
method and call this method.
Calls the initMediator
method.
Cleans up the mediator by calling ngOnDestroy
.
Generated using TypeDoc
This component reduces all boilerplate code to the absolut minimum:
columns = ['name', 'age'];
constructor() { super(SimpleTableMediator); }
fetch
function:return this.http.get('my-endpoint');
It exposes the
mediator
instance, so you may hook into its events.