Fixed entity type filter bug in new search system
This commit is contained in:
parent
1338ae2fc3
commit
46f3d78c8a
3 changed files with 8 additions and 8 deletions
|
@ -175,7 +175,7 @@ class SearchService
|
|||
// Split filter values out
|
||||
$splitFilters = [];
|
||||
foreach ($terms['filters'] as $filter) {
|
||||
$explodedFilter = explode(':', $filter, 1);
|
||||
$explodedFilter = explode(':', $filter, 2);
|
||||
$splitFilters[$explodedFilter[0]] = (count($explodedFilter) > 1) ? $explodedFilter[1] : '';
|
||||
}
|
||||
$terms['filters'] = $splitFilters;
|
||||
|
|
|
@ -53,6 +53,10 @@ let methods = {
|
|||
return;
|
||||
}
|
||||
this.appendTerm(typeTerm);
|
||||
},
|
||||
|
||||
updateSearch() {
|
||||
window.location = '/search?term=' + encodeURIComponent(this.termString);
|
||||
}
|
||||
|
||||
};
|
||||
|
|
|
@ -40,6 +40,9 @@
|
|||
<label><input type="checkbox" v-on:change="typeChange" v-model="search.type.book" value="book"> Book</label>
|
||||
</div>
|
||||
|
||||
|
||||
<button type="button" class="button pos" v-on:click="updateSearch">Update Search</button>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
@ -48,11 +51,4 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
@stop
|
||||
|
||||
@section('scripts')
|
||||
<script>
|
||||
|
||||
|
||||
</script>
|
||||
@stop
|
Loading…
Reference in a new issue