Slots
Slots allow you to insert you own custom HTML in predefined positions within the component:
beforeTable
: Before the table wrapper. After the controls rowafterTable
: After the table wrapper.beforeFilter
: Before the global filter (filterByColumn: false
)afterFilter
: After the global filterafterFilterWrapper
: After the global filter wrapperbeforeLimit
: Before the per page controlafterLimit
: After the per page controlbeforeFilters
: Before the filters row (filterByColumn: true
)afterFilters
: After the filters rowprependHead
: After the<thead>
tagbeforeBody
: Before the<tbody>
tagafterBody
: After the<tbody>
tagprependBody
: Prepend to the<tbody>
tagappendBody
: Append to the<tbody>
tag
In addition to these slots you can insert your own filter HTML in the filters row, or add content to the existing filter, e.g a button (When filterByColumn
is set to true
):
A. If you just want your own content make sure that the column is not filterable by omitting it from the filterable
array. Otherwise the slot content will be appended to the native filter.
B. Create a slot whose name is formatted filter__{column}
(double underscore).
For example, to insert a checkbox on the id
column instead of the normal input filter:
Last updated