X-Git-Url: https://git.arvados.org/arvados-workbench2.git/blobdiff_plain/877ce2a1b858c685eec0e8f47652ebb8a271195e..8d16d4c8b7705e68e6dc9acb4210e9df53a3fa88:/src/components/search-bar/search-bar.tsx diff --git a/src/components/search-bar/search-bar.tsx b/src/components/search-bar/search-bar.tsx index de9e7de5..ab25e137 100644 --- a/src/components/search-bar/search-bar.tsx +++ b/src/components/search-bar/search-bar.tsx @@ -3,7 +3,7 @@ // SPDX-License-Identifier: AGPL-3.0 import * as React from 'react'; -import { IconButton, Paper, StyleRulesCallback, withStyles, WithStyles } from '@material-ui/core'; +import { IconButton, Paper, StyleRulesCallback, withStyles, WithStyles, Tooltip } from '@material-ui/core'; import SearchIcon from '@material-ui/icons/Search'; type CssRules = 'container' | 'input' | 'button'; @@ -58,7 +58,7 @@ export const SearchBar = withStyles(styles)( timeout: number; render() { - const {classes} = this.props; + const { classes } = this.props; return
- + + +
; } componentDidMount() { - this.setState({value: this.props.value}); + this.setState({ value: this.props.value }); } componentWillReceiveProps(nextProps: SearchBarProps) { if (nextProps.value !== this.props.value) { - this.setState({value: nextProps.value}); + this.setState({ value: nextProps.value }); } } @@ -96,7 +98,7 @@ export const SearchBar = withStyles(styles)( handleChange = (event: React.ChangeEvent) => { clearTimeout(this.timeout); - this.setState({value: event.target.value}); + this.setState({ value: event.target.value }); this.timeout = window.setTimeout( () => this.props.onSearch(this.state.value), this.props.debounce || DEFAULT_SEARCH_DEBOUNCE