b-table: The computed property "fields" is already defined in data.
See original GitHub issueWhen using the b-table component, I get the following error messages:
The computed property "fields" is already defined in data.
``
and sometimes:
The computed property “fields” is already defined as a prop.
sometimes both.
Issue Analytics
- State:
- Created 6 years ago
- Comments:10 (5 by maintainers)
Top Results From Across the Web
The computed property "counter" is already defined in data
When I click on the button, the counter should double the number of clicks displayed, but it's not working. This code is working...
Read more >The computed property "fields" is already defined in data.
It is written like this. import Vue from 'vue'; import VeeValidate from 'vee-validate'; const config = { errorBagName: 'errors',//change if property conflicts.
Read more >Computed Properties - Vue.js
Here we have declared a computed property publishedBooksMessage . Try to change the value of the books array in the application data and...
Read more >Using Vue computed properties - Learn web development
To create a computed property, we need to add a computed property to our component object, much like the methods property we've used...
Read more >Vue warn]: Computed property "axios" is already defined in ...
Coding example for the question [Vue warn]: Computed property "axios" is already defined in Data. at -Vue.js.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This could also be caused by a third-party plugin that sets a global mixin containing a
fields
data/prop/computed value.For example,
vee-validate
adds afields
computed value in a global mixin (I encountered this exact issue when using bothbootstrap-vue
andvee-validate
). Luckilyvee-validate
allows you to rename this computed value (I assume to avoid this kind of conflict).Thank you @JakePicton and @tmorehouse for the solutions. I followed @tmorehouse’s guideline to stop lee-validate’s injection into all components as bellow:
Unfortunately, VueJs would throw error message like this: “Property or method “errors” is not defined on the instance but referenced during render. Make sure that this property is reactive, either in the data option, or for class-based components, by initializing the property”
Instead, change the Vee fields from configuration and it should work