X-Git-Url: https://git.arvados.org/arvados-workbench2.git/blobdiff_plain/98eba2bbc83b8d4bbce837f75924dbaed2664519..f29a01e226a8d1ae737fa10a63ccee4691d2bc8d:/src/components/search-input/search-input.tsx diff --git a/src/components/search-input/search-input.tsx b/src/components/search-input/search-input.tsx index f2ec2d64..50338f40 100644 --- a/src/components/search-input/search-input.tsx +++ b/src/components/search-input/search-input.tsx @@ -2,7 +2,7 @@ // // SPDX-License-Identifier: AGPL-3.0 -import * as React from 'react'; +import React from 'react'; import { IconButton, StyleRulesCallback, withStyles, WithStyles, FormControl, InputLabel, Input, InputAdornment, Tooltip } from '@material-ui/core'; import SearchIcon from '@material-ui/icons/Search'; @@ -34,6 +34,8 @@ const styles: StyleRulesCallback = theme => { interface SearchInputDataProps { value: string; + label?: string; + selfClearProp: string; } interface SearchInputActionProps { @@ -45,6 +47,8 @@ type SearchInputProps = SearchInputDataProps & SearchInputActionProps & WithStyl interface SearchInputState { value: string; + label: string; + selfClearProp: string; } export const DEFAULT_SEARCH_DEBOUNCE = 1000; @@ -52,18 +56,20 @@ export const DEFAULT_SEARCH_DEBOUNCE = 1000; export const SearchInput = withStyles(styles)( class extends React.Component { state: SearchInputState = { - value: "" + value: "", + label: "", + selfClearProp: "" }; timeout: number; render() { - const { classes } = this.props; return
- Search + {this.state.label}