Closed scottgrayson closed 8 years ago
Solution
<vuetable :http-data:"moreParams">
allows moreParams to be an object and it does not overwrite any existing vuetable params like pagination or sort.
example object:
moreParams: {
searchFor: '',
comps_only: 'true',
}
This is useful information IMO. it could be added here: https://github.com/ratiw/vue-table/wiki/Appending-Other-Parameters-to-the-Query-String
@scottgrayson In version 2.0 of vuetable that I'm currently working, the append-params
type has actually been changed from Array
to Object
.
In version 1.x of vuetable, I'm trying to avoid any breaking change until version 2.0 is released at the moment, unless it's really necessary. That's why it's still there.
I have been following your bootstrap example: https://github.com/ratiw/vuetable-example-vueify-bootstrap/blob/master/index.js#L112 If i am not mistaken, this code will overwrite any values in moreParams[] that you have set before the filter.
Would it be possible to make :append-params accept { key: value } instead of ['key=value']? This would make updates easier.
I have tried making moreParams a computed property to resolve my problem, but the values in vue dev tools and the values appended to http params do not match. Is using a computed property for :append-params not supported? I can provide the computed property code if necessary.