fix(search-bar): A few minor tweaks to search

This commit is contained in:
Ben Gotow 2015-03-05 19:22:58 -08:00
parent c21f992ed2
commit 3802e4899b
2 changed files with 9 additions and 5 deletions

View file

@ -94,6 +94,8 @@ SearchBar = React.createClass
_onValueChange: (event) ->
Actions.searchQueryChanged(@_stringToQuery(event.target.value))
if (event.target.value is '')
@_onClearSearch()
_onSelectSuggestion: (item) ->
Actions.searchQueryCommitted(item.value)

View file

@ -65,7 +65,10 @@
position: relative;
&.showing-suggestions {
.suggestions{ display: inherit; }
.suggestions { display: inherit; }
}
&.showing-query {
.clear { display: inherit; }
}
}
@ -79,11 +82,10 @@
&.clear {
position: absolute;
top: 0;
top: floor(40px - 26px)/2;
color: @input-accessory-color;
right: @padding-base-horizontal;
display: none;
padding: 17px 19px;
line-height: 20px
right: 0;
}
}
}