Say I'm using an imported Vue component: autocomplete
<script>
...
<autocomplete @submit="onSubmit"/>
</script>
...
methods: {
onSubmit: async(input) => {
// add user's input to selected
},
data () {
return {
selected: []
}
},
...
I'm passing in a method for the event handler. How can I give it this context so I can update data with input?