mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-02-01 04:50:59 +08:00
fix(search-bar): A few minor tweaks to search
This commit is contained in:
parent
c21f992ed2
commit
3802e4899b
2 changed files with 9 additions and 5 deletions
|
@ -94,6 +94,8 @@ SearchBar = React.createClass
|
||||||
|
|
||||||
_onValueChange: (event) ->
|
_onValueChange: (event) ->
|
||||||
Actions.searchQueryChanged(@_stringToQuery(event.target.value))
|
Actions.searchQueryChanged(@_stringToQuery(event.target.value))
|
||||||
|
if (event.target.value is '')
|
||||||
|
@_onClearSearch()
|
||||||
|
|
||||||
_onSelectSuggestion: (item) ->
|
_onSelectSuggestion: (item) ->
|
||||||
Actions.searchQueryCommitted(item.value)
|
Actions.searchQueryCommitted(item.value)
|
||||||
|
|
|
@ -65,7 +65,10 @@
|
||||||
position: relative;
|
position: relative;
|
||||||
|
|
||||||
&.showing-suggestions {
|
&.showing-suggestions {
|
||||||
.suggestions{ display: inherit; }
|
.suggestions { display: inherit; }
|
||||||
|
}
|
||||||
|
&.showing-query {
|
||||||
|
.clear { display: inherit; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -79,11 +82,10 @@
|
||||||
|
|
||||||
&.clear {
|
&.clear {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 0;
|
top: floor(40px - 26px)/2;
|
||||||
|
color: @input-accessory-color;
|
||||||
|
right: @padding-base-horizontal;
|
||||||
display: none;
|
display: none;
|
||||||
padding: 17px 19px;
|
|
||||||
line-height: 20px
|
|
||||||
right: 0;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue