Answer the question
In order to leave comments, you need to log in
Why doesn't a function work if I assign it via an assignment?
To be honest, I'm not sure if it's because of the View, or if it's normal JS work.
Generally it works fine.
option: {
getFilterData: {
'terror': function (el) {
const check = function(element) {
return element.name === 'terror'
}
return el.tags.some(check)
}
}
}
option: {
getFilterData: this.function
},
function: {
'terror': function (el) {
const check = function(element) {
return element.name === 'terror'
}
return el.tags.some(check)
}
}
Answer the question
In order to leave comments, you need to log in
option: {
getFilterData: this.function
},
getFilterData: functionName
then in getFilterData you will receive a response from the function. What a particular function returns, not the function itself
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question