You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It will always log on the first component instance instead of on the proper instance the makeFindMixin is being used.
Solution
When you define the data function, you reuse the same data const in all instances of the makeFindMixin.
By recreating a new object from the data const, all is good.
data () {
return { ...data }
}
An object.assign should do the job here too.
Expected behavior
The is{name}FindPending (or all props of the data object) should be changed only on the instance of the component where the mixin is defined.
Actual behavior
The is{name}FindPending data is reused on all component instances instead of having one data instance object per component instance. In other words, the dynamic data props are reused by all component instances that use the makeFindMixin mixin.
The text was updated successfully, but these errors were encountered:
Good catch! @kornalius it's funny to me that I never noticed this. I guess I didn't spend much time with the mixins before switching to the composition api. This is definitely a bug and should be an easy fix.
Steps to reproduce
This is a though one to explain, however I found the solution. I spent a few days on this one.
It will always log on the first component instance instead of on the proper instance the makeFindMixin is being used.
Solution
When you define the data function, you reuse the same data const in all instances of the makeFindMixin.
By recreating a new object from the data const, all is good.
Expected behavior
The is{name}FindPending (or all props of the data object) should be changed only on the instance of the component where the mixin is defined.
Actual behavior
The is{name}FindPending data is reused on all component instances instead of having one data instance object per component instance. In other words, the dynamic data props are reused by all component instances that use the makeFindMixin mixin.
The text was updated successfully, but these errors were encountered: