Skip to content

Commit 98754c5

Browse files
committed
Filter. Reset button added
1 parent a2385eb commit 98754c5

File tree

1 file changed

+17
-9
lines changed

1 file changed

+17
-9
lines changed

src/components/Filters.tsx

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,12 @@ import React from "react";
22
import {
33
Grid,
44
TextField,
5-
IconButton,
65
Select,
76
MenuItem,
87
FormControl,
98
InputLabel,
9+
Button,
1010
} from "@material-ui/core";
11-
import { Clear } from "@material-ui/icons";
1211
import { TestRun, TestVariation } from "../types";
1312

1413
interface IProps {
@@ -70,13 +69,6 @@ const Filters: React.FunctionComponent<IProps> = ({
7069
label="Name"
7170
value={query}
7271
onChange={(event) => setQuery(event?.target.value)}
73-
InputProps={{
74-
endAdornment: (
75-
<IconButton onClick={() => setQuery("")}>
76-
<Clear />
77-
</IconButton>
78-
),
79-
}}
8072
/>
8173
</Grid>
8274
{osList.length > 0 && (
@@ -201,6 +193,22 @@ const Filters: React.FunctionComponent<IProps> = ({
201193
</FormControl>
202194
</Grid>
203195
)}
196+
<Grid item>
197+
<Button
198+
variant="contained"
199+
color="primary"
200+
onClick={() => {
201+
setQuery("");
202+
setOs("");
203+
setDevice("");
204+
setBrowser("");
205+
setViewport("");
206+
setTestStatus("");
207+
}}
208+
>
209+
Reset
210+
</Button>
211+
</Grid>
204212
</Grid>
205213
</React.Fragment>
206214
);

0 commit comments

Comments
 (0)