Added refetch to the jobs find modal to find new jobs that may have been added BOD-43

This commit is contained in:
Patrick Fic
2020-04-27 09:56:40 -07:00
parent d359589b96
commit 6c0f0b082b
2 changed files with 15 additions and 6 deletions

View File

@@ -1,4 +1,5 @@
import { Checkbox, Divider, Table, Input } from "antd";
import { SyncOutlined } from "@ant-design/icons";
import { Checkbox, Divider, Input, Table, Button } from "antd";
import React from "react";
import { useTranslation } from "react-i18next";
import { Link } from "react-router-dom";
@@ -11,6 +12,7 @@ export default function JobsFindModalComponent({
jobsListLoading,
importOptionsState,
modalSearchState,
jobsListRefetch,
}) {
const { t } = useTranslation();
const [modalSearch, setModalSearch] = modalSearchState;
@@ -138,6 +140,12 @@ export default function JobsFindModalComponent({
title={() => (
<div style={{ display: "flex" }}>
{t("jobs.labels.existing_jobs")}
<Button
onClick={() => {
jobsListRefetch();
}}>
<SyncOutlined />
</Button>
<Input
value={modalSearch}
onChange={(e) => {