I'm currently working on retrieving data for my search tree, and I'm facing issues with fetching the data directly from axios or calling a function because it cannot be found.
export default {
name: 'SideNavMenu',
data () {
return {
searchValue: '',
treeData: this.getData(),
treeOptions: {
fetchData(node) {
this.onNodeSelected(node)
}
},
}
},
Within the data() method, I have a section called treeOptions where I am attempting to invoke a function named onNodeSelected. However, an error message is displayed:
"TypeError: this.onNodeSelected is not a function"
Is there anyone who can assist with resolving this issue?