I've got a string that's formatted in a textbox as comma-separated, however when I try and split it convert it to an array to loop through them I'm getting the error
Type 'string[]' is not assignable to type 'string'
My textbox (using ionic, but essentially just a textarea when rendered
<ion-textarea type="text" v-model="CSVItems" placeholder="e.g. chicken, rice, peas"></ion-textarea>
The data/methods are as follows (cut down to just necessary for the post)
data() {
return {
CSVItems: "",
myResult: "",
};
},
methods: {
addItem: function() {
this.myResult = this.CSVItems.split(",");
},
