Skip to content
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

v-bind not working well in v-for loop #46

Open
mbokil opened this issue Oct 30, 2021 · 2 comments
Open

v-bind not working well in v-for loop #46

mbokil opened this issue Oct 30, 2021 · 2 comments
Labels
bug Something isn't working Need infos

Comments

@mbokil
Copy link

mbokil commented Oct 30, 2021

I ran into this problem with v-bind. I have line charts in a loop using the composition API but the charts kept disappearing when the data changes. I ended up having to force the line charts remount using a v-if hack. After the component is mounted I set the v-if to true to force the component to remount. Anyone seen this issue?
<LineChart v-if="row.isVisible" v-bind="row.bpTrendProps" class="tilesLineChart" :options="row.bpChartOptions" />

@victorgarciaesgi
Copy link
Owner

Hi @mbokil , can you make a quick reproduction on codesandbox or something so I can investigate? :)
Maybe is because of the v-for key attribute, but I think you tried it already

@mbokil
Copy link
Author

mbokil commented Oct 30, 2021

Yeah I have a unique key for each element. I tried some other suggestions like adding another binding like :updateCount="count" to the chart and then incremented count after updating the data but the reactivity doesn't pickup the change. Let me see if I can isolate the component and post it with some mock data on codesandbox.

@victorgarciaesgi victorgarciaesgi added bug Something isn't working Need infos labels Nov 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Need infos
Projects
None yet
Development

No branches or pull requests

2 participants