1
0
Fork 0

Sort by relevance more dynamic, removed school search

This commit is contained in:
Joe Wroten 2017-05-16 23:00:31 -05:00
parent 96f3dda172
commit 16f5ee9de7

View file

@ -19,13 +19,11 @@ import { state, dispatch } from '../store'
export default {
data () {
return {
state,
sortByOptions: [
{
label: 'Relevance',
value: 'sortScore'
return { state }
},
computed: {
sortByOptions () {
let options = [
{
label: 'Name',
value: 'name'
@ -33,12 +31,17 @@ export default {
{
label: 'Level',
value: 'level'
},
{
label: 'School',
value: 'school'
}
]
if (this.state.search.length >= 3) {
options.unshift({
label: 'Relevance',
value: 'sortScore'
})
}
return options
}
},
methods: {