Vue3-datatables
  • Dependencies & Compatability
  • Getting Started
  • Client Table
    • Asynchronous Loading
    • Grouping
    • Filtering Algorithm
    • Editable Cells
  • Server Table
    • Implementations
    • Custom Request Function
    • Setting Multiple Request Parameters
    • Error Message
    • Draw Counter
  • Dependencies & Compatability
  • Getting Started
  • Virtual Pagination
  • Column Templates
  • Nested Data Structures
  • Selectable Rows
  • List Filters
  • Custom Template
  • Custom Filters
  • Multiple Sorting
  • Date Columns
  • Custom Sorting
  • Conditional Cell Styling
  • Columns Visibility
  • Child Rows
  • Properties
  • Slots
  • Methods
  • Events
Powered by GitBook
On this page

Custom Filters

Custom filters allow you to integrate your own filters into the plugin using Vue's events system.

A. use the customFilters option to declare your filters, following this syntax:

callback: function (row, query) {

return row.name[0] == query;

B. Then emit the event when appropriate:

Event.$emit('vue-tables.filter::alphabet', query);

EventBus.emit('vue-tables.filter::alphabet', query);

this.$store.commit('myTable/SET_CUSTOM_FILTER', {filter:'alphabet', value:query})

A. use the customFilters option to declare your filters, following this syntax:

customFilters: ['alphabet','age-range']

B. the same as in the client component.

C. Custom filters will be sent as request parameters. Implement the necessary logic on the server side.

PreviousCustom TemplateNextMultiple Sorting