Commit decbaf11 authored by Randall Leeds's avatar Randall Leeds

Search bar should always clear internal text state

This fixes a situation where the search bar would not be able to clear
when the last search performed was empty.
parent 79a3ee24
......@@ -6,6 +6,7 @@ simpleSearch = ['$parse', ($parse) ->
scope.reset = (event) ->
event.preventDefault()
scope.query = ''
scope.searchtext = ''
scope.search = (event) ->
event.preventDefault()
......
......@@ -46,6 +46,8 @@ describe 'h.directives', ->
assert($scope.clear.called)
it 'clears the search-bar', ->
isolate.query = ''
isolate.$digest()
isolate.searchtext = "Test query"
isolate.$digest()
$element.find('.simple-search-clear').click()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment