-
Notifications
You must be signed in to change notification settings - Fork 399
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fields prop breakes down after changing page #51
Comments
@RidgeA Sorry, I don't understand what you mean by "the |
@RidgeA I really doubt that it was caused by the Vuetable code as everything is working well on my side and all the sample code still work as expected. However, I would suspect the problem from the API side. Could you please check the return status of the API endpoint when you request for the second page? If you are using some kind of stateless authentication (e.g. the oauth in the api-url), please also make sure the you send appropriate token to the API backend. The only way to know for sure about this is to inspect the HTTP request/response. |
I have checked this. API works properly and returns data in expected format and with 200 status code. Pagination works properly only if I specify
|
@RidgeA Try moving the array out into its own object, like so <vuetable ref="vuetable"
api-url="/oauth/clients/tokens"
:fields='columns'
pagination-path=""
@vuetable:pagination-data="onPaginationData">
</vuetable> data () {
return {
columns: [ 'user_id', 'client_id' ]
}
} |
@ratiw Yes, it works, thank you. Nevertheless, I think, it is a bug. |
Because there are no pagination. In lesson 7 of your tutorial (first lesson with pagination) try to change
and after loading change table page. |
@RidgeA That's interesting. I'll check it out to see what would be the cause of that. Thanks. |
@RidgeA The cause of the problem is the use of |
Thanks a lot!
Just to make it clear - is this fix in vue or in vuetable? In order to know which updates to wait. |
It's a fix in vuetable. I haven't push the update yet as I'm waiting to finish another feature I'm working on. |
Thank you! |
@ratiw
|
@lmj0011 Hopefully soon. I just can't find enough time to finish it at the moment. But if you could just move the fields definition into an object, it should fix the problem at the moment. |
@ratiw thanks for the fast reply. disregard my previous comment I had to restart my app, "hot-module-reload" is always messing up things are working like so <template>
<vuetable ref="vuetable"
api-url="http://vuetable.ratiw.net/api/users"
:fields="columns"
></vuetable>
</template>
<script>
import Vuetable from 'vuetable-2/src/components/Vuetable'
export default {
data () {
return {
'columns': [
'name', 'email', 'birthdate',
{
name: 'address.line1',
title: 'Address 1'
},
{
name: 'address.line2',
title: 'Address 2'
},
{
name: 'address.zipcode',
title: 'Zipcode'
}
]
}
},
components: {
Vuetable
}
}
</script> |
Hello! I have faced with a strange problem.
I use vuetable2 (with pagination) and Laravel 5.3.
During an initial loading everything is well. But when I try to change page - table rendering fails.
It happens because
this.field
prop breaks down.In loadData method before calling
Vue.http.get
there are 2 objects in property, but in the first row ofloadSuccess
method - it consists of 2 strings (as defined in directive)components defining:
Vuetable.vue:
The text was updated successfully, but these errors were encountered: