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
vs-tabs + API call #618
Comments
The same! |
The The Vuesax team will need to update the component to support this functionality. If I can find some time, I'll look into it and submit a pull request. In the meaning, here's a hack you can use to get around it: <div :key="forceRender">
<vs-tabs>
<template v-for="(user, index) in myUsers">
<vs-tab :key="index" :label="user.firstName">
{{ user.address }}
</vs-tab>
</template>
</vs-tabs>
</div>
<script>
export default {
watch: {
myUsers(val) {
this.forceRender += 1
}
},
}
</script> |
I have a similar issue how do I make the tabs label reactive to localization change as other components. vs-tab doesn't seem to bind the values unless the page is reloaded. |
Same here. I can not make tabs from API call result. Is there any progress? |
I solved it like this. It might work for you. After page load, I change to localization titles with javascript.
|
This problem appears just because "vs-tabs" loads before the api call finished. To prevent this, add v-if="apiCallData.length" condition for "vs-tabs" so that it be loaded only after the data recieved completely from the server.
|
I think this is the most efficient solution, simple. Working, thanks. |
This is the perfect solution, I've spent almost a day figuring out the issue. Thanks. |
I am using vs-tabs component. This works fine if I load static data, but if I load data from API, it gives error in browser console like below.
The text was updated successfully, but these errors were encountered: