Closed jsonantunes closed 7 years ago
@johnsoons This looks like the same issue here.
If you dynamically change fields definition, you will need to call normalizeFields
, so that the fields definition is properly parsed. This can be done in Vuetable-2 by creating a ref
in your <vuetable>
tag like so,
<vuetable ref="vuetable"
//...
></vuetable>
Then, you can call normalizeFields
like this
this.$refs.vuetable.normalizeFields()
Thanks for the @ratiw return,
It really makes sense to place them dynamically in change fields, however, in the case in question the columns fields are not changed, only the data with the filter result is changed.
@johnsoons Sorry, I don't quite understand what you mean. Perhaps you could should me the output of the code or error messages.
Hi @ratiw,
When you first get the data, everything works correctly
id | Name | Age |
---|---|---|
1 | Janice D. Buckner | 20 |
2 | John G. Aragon | 31 |
3 | Lynn C. Whitt | 40 |
After filtering, the data is retrieved correctly, however as normalization is lost the columns are added and the data is not listed.
--- | --- | --- |
---|
With the solution I mentioned, this problem in my case solved.
Thanks for listening! :)
Hello,
Working with a SPA application, For some reason the normalization of fields is lost when executing the refresh method, so the result of the filter is not displayed.
I added a call to the normalization method whenever loadData is executed, and it worked.
My alternate implementation to work around this problem:
`
Is this really necessary, or am I wrong somewhere?
Translated by google ;)