Description
The array filters are implemented as methods in a mixin, which can cause problems if the names collide with methods in other components or mixins. (I just spent a couple hours tracking down why a 3rd party component wasn't working, and turned out they had a prop
named filterBy
that was getting clobbered by the filterBy
method from vue-filters
.
The names used are pretty common, so this is likely to cause many issues when you mix in the filters globally (as you do in Nuxt with a plugin).
Probably the best solution would be to namespace all the methods so they are unlikely to collide. E.g. vfOrderBy
instead of orderBy
. This could be optional so those who don't need it (they're using filters locally in a component instead of globally in an app) wouldn't have to use it.