v
v
vue-tables-2
Search…
Setting Multiple Request Parameters
Set all request parameters programatically
While there are methods for setting each parameter of the table (e.g `setLimit`, `setFilter`, `setOrder` etc.), each of those methods would trigger a request to the server. Sometimes you may wish to set multiple parameters at once with a single request. The setRequestParams method allows for that. E.g:
1
this.$refs.myTable.setRequestParams({
2
page:2,
3
limit:10,
4
order:{column:'created_at',ascending:false},
5
filters: 'Some value',
6
customFilters:{
7
myCustomFilter:100
8
}
9
})
Copied!
Each key on this object maps to the method used to set this specific key:
page: setPage
limit: setLimit
order: setOrder
filters: setFilter
customFilters: setCustomFilters
So for example, if you use filterByColumn:true you would pass to the filters key an object of key-value pairs, rather than a string.
Copy link