Update VueJs component on route change

You may want to add a :key attribute to <router-view> like so: <router-view :key=”$route.fullPath”></router-view> This way, Vue Router will reload the component once the path changes. Without the key, it won’t even notice that something has changed because the same component is being used (in your case, the Map component).

Vue change object in array and trigger reactivity

You could update the sub-property in the array element with this.$set(). For example, to increment an x subproperty in the first two array elements (creating the sub-property if it doesn’t exist): methods: { update() { this.$set(this.arr[0].foo, ‘x’, (this.arr[0].foo.x || 0) + 100) this.$set(this.arr[1].foo, ‘x’, (this.arr[1].foo.x || 0) + 100) } } new Vue({ el: ‘#app’, … Read more

VueJS – v-bind:style + hover

Improved solution: use CSS custom properties and variables If you only intend to work with modern/evergreen browsers, then using CSS custom properties and variables is the way to go! You can actually pass CSS custom properties into the :style binding, e.g. computed: { styleObject: function() { return { ‘–color’: this.button.color, ‘–color-hover’: this.button.colorHover } } } … Read more

How do I use “custom filter” prop in data tables in vuetify? or How do I create a custom filter to filter by headers?

Looking at the code on Github1, it looks like the customFilter prop is used to overwrite the default method used to determine how the filter prop is applied to the items in the table. The default customFilter method applies the filter function to each property name of each item object and filters out any items … Read more

How to get data to work when used within a component and Axios?

As the error is saying: The “data” option should be a function In the component, the data must be a function, you need to modify the data block to be a function which will return the data structure to be used in DOM in a reactive way: Vue.component(‘symbols-table’, { template: ‘<h1>Hello World</h1>’, data: function() { … Read more