-
Notifications
You must be signed in to change notification settings - Fork 34
Closed
Description
I noticed a problem in component logic of clusterized child components.
Assuming the child component looks like this:
example:
{
props: ['index'],
template: '<div :style="(selected) ? 'background:red' : ''" v-on:click="selected=!selected">{{ index }}</div>',
data: function()
{
return {
selected: false
}
},
}
While the "index" property is properly set and displayed on clusterized components, it doesn't seem to be possible to keep logic within a unique child component because of the shared _uid's. So if you click on the component with the index of 1, you will see it will be repeated further down the list (in my case the component with an index of 60 has the same "selected" state... as well as 120, 180 and so on).
Applying a unique _uid to each component via track-by helps with the "selected" logic, but slows down the scrolling tremendously eliminating the advantages of vue-clusterize.
Is there any way to solve this?
Metadata
Metadata
Assignees
Labels
No labels