isFirstOfType is not a computed property

This commit is contained in:
roschaefer 2019-12-20 17:38:30 +01:00
parent 9f8c207b46
commit fb6e116446

View File

@ -90,16 +90,14 @@ export default {
isActive() {
return !isEmpty(this.previousSearchTerm)
},
isFirstOfType() {
return function(option) {
return (
this.options.findIndex(o => o === option) ===
this.options.findIndex(o => o.__typename === option.__typename)
)
}
},
},
methods: {
isFirstOfType(option) {
return (
this.options.findIndex(o => o === option) ===
this.options.findIndex(o => o.__typename === option.__typename)
)
},
onFocus(event) {
clearTimeout(this.searchProcess)
this.isOpen = true