-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #520 from kbss-cvut/filter-FTA-table
Implement filtering of fta table
- Loading branch information
Showing
12 changed files
with
521 additions
and
202 deletions.
There are no files selected for viewing
179 changes: 0 additions & 179 deletions
179
src/components/dashboard/content/list/FaultTreeAndSystemOverviewTable.tsx
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
import React, { FC, useState } from "react"; | ||
import { Box, TextField, Button } from "@mui/material"; | ||
|
||
interface FaultTreeFiltersProps { | ||
onFilterChange: (label: string, snsLabel: string) => void; | ||
} | ||
|
||
const FaultTreeFilters: FC<FaultTreeFiltersProps> = ({ onFilterChange }) => { | ||
const [label, setLabel] = useState<string>(""); | ||
const [snsLabel, setSnsLabel] = useState<string>(""); | ||
|
||
const handleFilterChange = () => { | ||
onFilterChange(label, snsLabel); | ||
}; | ||
|
||
return ( | ||
<Box display="flex" alignItems="center" mb={2}> | ||
<TextField | ||
label="FHA Label" | ||
value={label} | ||
onChange={(e) => setLabel(e.target.value)} | ||
variant="outlined" | ||
style={{ marginRight: 8 }} | ||
/> | ||
<TextField | ||
label="SNS Label" | ||
value={snsLabel} | ||
onChange={(e) => setSnsLabel(e.target.value)} | ||
variant="outlined" | ||
style={{ marginRight: 8 }} | ||
/> | ||
<Button variant="contained" color="primary" onClick={handleFilterChange}> | ||
Apply Filters | ||
</Button> | ||
</Box> | ||
); | ||
}; | ||
|
||
export default FaultTreeFilters; |
Oops, something went wrong.