The type of data that will be given to
searchFunction
.
The type that is expected to be in the results
array of the PaginatedSearchResults
instance resolved by the Promise
returned by the
searchFunction
.
Protected
Internal
_formProtected
Internal
_loadingProtected
Internal
_searchProtected
cancelCurrent Web standards do not allow Promises
to be
cancelled. Components that use the
LisPaginatedSearchMixin
mixin can use
this controller to make Promises
cancelable. Event
listeners can also subscribe to the controller and will be called whenever
it cancels. The underlying AbortSignal
is also
available for more low-level access. This is the value of the abortSignal
attribute of the PaginatedSearchOptions
object passed to the component's SearchFunction
.
Protected
domComponents that use the
LisPaginatedSearchMixin
mixin can use
this controller to subscribe to the
DOMContentLoaded
event. The advantage to
using the controller instead of subscribing to the event directly is that
the controller triggers a redraw of the component's template, meaning if a
listener updates a property that should change the template, triggering a
redraw of the template will be handled by the controller.
Protected
queryComponents that use the
LisPaginatedSearchMixin
mixin can use
this controller to interact with URL query string parameters. For example,
it can be used to set values of form elements reactively, i.e. if the
query string parameter a form element gets its value changes, then the
element's value will be updated in the component's template.
Protected
requiredThe LisPaginatedSearchMixin
mixin will
automatically perform a search when loaded if certain parameters are
present in the URL query string. Components that use the mixin can specify
what parameters are necessary by setting this property in their
constructor. Specifically, this property represents groups of parameters that will
trigger a search if all parameters within a group are present.
Components that use the
LisPaginatedSearchMixin
mixin must
define what attributes their search results will have so the mixin can
correctly parse and display the results in a table. These attributes
can be specified by setting this property in a component's constructor.
Additionally, this property may be used by the end user at run-time to override the
default result attributes defined by the component.
Protected
resultsInfo about the results returned by the searchFunction
.
Components that use the
LisPaginatedSearchMixin
mixin will
inherit this property. It stores an external function that must be provided
by users of the component that performs a search using the data from the
component's submitted search form.
Protected
searchThe results returned by the searchFunction
.
Components that use the
LisPaginatedSearchMixin
mixin can optionally
define CSS classes for the columns of the table results are displayed in a table.
The classes are set from an object that has attributes matching the
resultAttributes
. The object can be specified by setting this property in a
component's constructor. Additionally, this property may be used by the end used at
run-time to override the default table column classes defined by the component.
Components that use the
LisPaginatedSearchMixin
mixin must
define what attributes their search results will have so the mixin can
correctly parse and display the results in a table. The header of the
table is set from an object that has these attributes. The object can
be specified by setting this property in a component's constructor. Additionally,
this property may be used by the end used at run-time to override the default table
headers defined by the component.
Protected
_getProtected
_queryProtected
_resetProtected
_searchProtected
_searchInternal
Protected
_updateInternal
Protected
formWhen the form of a component that use the
LisPaginatedSearchMixin
mixin is
submitted, the mixin parses the form contents into a
!FormData | FormData
instance. This instance is converted into
a simple object mapping form element names to their values. This conversion
is done with the formToObject
method. If the object doesn't match the
expected SearchData
template type or if there are redundant names in the
!FormData | FormData
instance that need to be resolved, then the
component should override the formToObject
method.
The !FormData | FormData
instance to convert
into an object.
The object generated from the given !FormData | FormData
instance.
Protected
renderComponents that use the
LisPaginatedSearchMixin
mixin need to
provide the search form that the mixin will process. This is done by
overriding the renderForm
method.
The form portion of the template.
Error
This exception is thrown if the renderForm
method is not overridden when
called.
Protected
renderBy default, the LisPaginatedSearchMixin
displays search results using the
LisSimpleTableElement | LisSimpleTableElement
. Components that use the
mixin can override this portion of the template by implementing their own
renderResults
method. The results data will be available via the inherited
searchResults
variable.
The results portion of the template.
Protected
renderBy default, the LisPaginatedSearchMixin
displays search results info using the in paragraph tags. Components that use the
mixin can override this portion of the template by implementing their own
renderResultsInfo
method.
The results info portion of the template.
Components that use the
LisPaginatedSearchMixin
mixin will
inherit this method. It allows the component's search form to be submitted
programmatically.
Protected
valueA helper method that returns that first value that's defined: the given value, the value of the specified querystring parameter, an empty string.
The value to potentially return.
The querystring parameter to potentially return the value of.
The first value that was defined.
Generated using TypeDoc
The interface of the class generated by the
LisPaginatedSearchMixin
mixin.