labels function not called
doublej42 opened this issue · 1 comments
doublej42 commented
Template
<JsonCSV
:data="json_data"
:fields="getCSVFields"
:labels="getCSVLabels"
>
Download
</JsonCSV>
Code:
import JsonCSV from "vue-json-csv";
export default {
components: {
JsonCSV
},
data() {
json_data: [
{
'name': 'Tony Peña',
'city': 'New York',
'country': 'United States',
'birthdate': '1978-03-15',
'phone': {
'mobile': '1-541-754-3010',
'landline': '(541) 754-3010'
}
},
{
'name': 'Thessaloniki',
'city': 'Athens',
'country': 'Greece',
'birthdate': '1987-11-23',
'phone': {
'mobile': '+1 855 275 5071',
'landline': '(2741) 2621-244'
}
}
]
}
}
},
methods: {
getCSVFields: function(value,key)
{
//console.log in here gets called fine
if (key == 'groupColor')
{
return false
}
return true;
},
getCSVLabels: function(value,key)
{
console.log('getCSVLabels',value,key)
//this doesn't show in my console
return key+value;
}
}
}
Belphemur commented
🎉 This issue has been resolved in version 1.2.3 🎉
The release is available on:
Your semantic-release bot 📦🚀