Sort by relevance more dynamic, removed school search
This commit is contained in:
		
							parent
							
								
									96f3dda172
								
							
						
					
					
						commit
						16f5ee9de7
					
				
					 1 changed files with 14 additions and 11 deletions
				
			
		|  | @ -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: { | ||||
|  |  | |||
		Loading…
	
	Add table
		
		Reference in a new issue
	
	 Joe Wroten
						Joe Wroten