diff --git a/src/components/App/__snapshots__/App.test.js.snap b/src/components/App/__snapshots__/App.test.js.snap
index 8b94ada..7318107 100644
--- a/src/components/App/__snapshots__/App.test.js.snap
+++ b/src/components/App/__snapshots__/App.test.js.snap
@@ -3267,6 +3267,60 @@ exports[`App Route /issues authenticated 1`] = `
{
(async () => {
try {
if (!token) return;
- await getIssues(
- {
- limit: pageSize,
- offset: pageSize * pageIndex,
- order: `${orderBy} ${order}`,
- },
- token
- );
+ const options = {
+ limit: pageSize,
+ offset: pageSize * pageIndex,
+ order: `${orderBy} ${order}`,
+ };
+ await getIssues(Object.assign(options, search), token);
} catch (e) {
setMessage(e.message);
logger.warn(e.stack);
@@ -130,14 +128,12 @@ const IssueSelectionTable = (props) => {
const handleDelete = (id) => {
deleteIssue(id, token).then(() => {
- getIssues(
- {
- limit: pageSize,
- offset: pageSize * pageIndex,
- order: `${orderBy} ${order}`,
- },
- token
- );
+ const options = {
+ limit: pageSize,
+ offset: pageSize * pageIndex,
+ order: `${orderBy} ${order}`,
+ };
+ getIssues(Object.assign(options, search), token);
});
};
@@ -185,19 +181,19 @@ const IssueSelectionTable = (props) => {
-
+
diff --git a/src/components/Issues/List/index.jsx b/src/components/Issues/List/index.jsx
index cbf115b..42b881e 100644
--- a/src/components/Issues/List/index.jsx
+++ b/src/components/Issues/List/index.jsx
@@ -7,10 +7,13 @@ import { useUserContext } from "../../Contexts/UserContext";
import { IssueProvider } from "../../Contexts/IssueContext";
import IssueSelectionTable from "../../Controls/IssueSelectionTable";
+import SearchField from "../../Controls/SearchField";
+import { useLocalStorage } from "../../useLocalStorage";
import useStyles from "../../useStyles";
const MainForm = () => {
const classes = useStyles();
+ const [search, setSearch] = useLocalStorage("ISSUES_SEARCH", "");
const { setTitle, setSitePath } = useStatusContext();
const {
token: {
@@ -18,7 +21,9 @@ const MainForm = () => {
},
} = useUserContext();
-
+ const handleSearch = (query) => {
+ setSearch(query);
+ };
useEffect(() => {
setTitle("Issues");
@@ -32,11 +37,15 @@ const MainForm = () => {
+
+
+
);