mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-30 10:54:09 -05:00
Restrict # of hits returned; clear results on empty search string.
This commit is contained in:
parent
c82f4481e4
commit
c2ace9a0a0
1 changed files with 4 additions and 4 deletions
|
@ -64,9 +64,9 @@ define [
|
||||||
|
|
||||||
$scope.$watch "form.subject", (newVal, oldVal) ->
|
$scope.$watch "form.subject", (newVal, oldVal) ->
|
||||||
if newVal and newVal != oldVal
|
if newVal and newVal != oldVal
|
||||||
algoliaSearch.searchWiki newVal, _handleSearchResults
|
algoliaSearch.searchWiki newVal, _handleSearchResults, { hitsPerPage: 3 }
|
||||||
|
else
|
||||||
$scope.$watch "suggestions", (newVal) -> console.log newVal
|
$scope.suggestions = [];
|
||||||
|
|
||||||
$scope.close = () ->
|
$scope.close = () ->
|
||||||
$modalInstance.close()
|
$modalInstance.close()
|
||||||
|
|
Loading…
Reference in a new issue