Methods
List of methods to trigger using .emit()
Last updated
List of methods to trigger using .emit()
Last updated
filter
: Filter by a given column. Receives an object with a column
and query
properties. You can use this to trigger filtering on the table from your own UI elements (which can either be external to the table, or embedded via a ). E.g, say you have a dropdown field with a products handle. When the user selects a value you can trigger:
Tablecloth will handle the rest. If its a client table, the search will occur on the front-end. If it is a server table, a request will be sent with the relevant filter, and handled in the back-end.
An optional operand
parameter can be added for numeric and date fields. E.g if you want to search for a number greater than 60:
Supported operands: <
,<=
,>
,>=
,LIKE
To search for a range of numbers or dates pass an array to the query
property:
filter.setAll
: Set multiple filters at once. Same syntax as filter
, except it accepts an array. E.g:
filter.resetAll
: Reset all filters (except for native free text filter)
filter.reset
: resets (removes) a specific filter. Accepts column name. e.g emit('filter.reset','dateFieldHandle')
sort
: Sorts by a given column. Accepts an object with a column
and asc
properties, the latter being a Boolean for "is ascending order?" .
paginate
: Changes the page. Accepts a page number.