Commit 1e70d3d5 authored by Elisabeth Reuhl's avatar Elisabeth Reuhl
Browse files

Added clear button to search string field

parent b9f0c58d
......@@ -303,9 +303,22 @@ export const OurMap = () => {
type="text"
variant="outlined"
name="searchStr"
defaultValue={input.searchStr}
value={input.searchStr}
placeholder="*"
onChange={event => dispatch({type: "UPDATE_INPUT", payload: {field: event.currentTarget.name, value: event.currentTarget.value}})}
InputProps={{
endAdornment: (
input.searchStr!==""
&&<IconButton
onClick={() => {
dispatch({type: "UPDATE_INPUT", payload: {field: "searchStr", value: ""}});
}}
>
<ClearIcon />
</IconButton>
)
}}
/>
</FormGroup>
</Grid>
{!input.showArchaeoSites&&<Grid item xs={12} lg={6}>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment