Skip to content
Snippets Groups Projects
Commit 149a4b73 authored by Atte Keinänen's avatar Atte Keinänen
Browse files

Focus back to input after clicking the input reset button

parent 51ba35a1
No related branches found
No related tags found
No related merge requests found
......@@ -82,7 +82,10 @@ export default class EntitySearch extends Component {
this.setState({ searchText }, this.applyFiltersAfterFilterChange)
}
resetSearchText = () => this.setSearchText("")
resetSearchText = () => {
this.setSearchText("")
this.searchHeaderInput.focus()
}
applyFiltersAfterFilterChange = () => this.applyFiltersForEntities(this.props.entities)
......@@ -303,7 +306,11 @@ class SearchResultsList extends Component {
<Icon name="chevronleft" size={15}/>
</span>
<span
className={cx("flex align-center justify-center rounded", {"cursor-pointer bg-grey-3 text-white": end + 1 < entityCount}, {"bg-grey-1 text-grey-3": end + 1 >= entityCount})}
className={cx(
"flex align-center justify-center rounded",
{ "cursor-pointer bg-grey-3 text-white": end + 1 < entityCount },
{ "bg-grey-1 text-grey-3": end + 1 >= entityCount }
)}
style={{width: "25px", height: "25px"}}
onClick={() => this.setState({page: page + 1})}>
<Icon name="chevronright" size={15}/>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment