Fixed searching on all jobs page BOD-81
This commit is contained in:
@@ -9,14 +9,8 @@ import PhoneFormatter from "../../utils/PhoneFormatter";
|
||||
import { alphaSort } from "../../utils/sorters";
|
||||
import StartChatButton from "../chat-open-button/chat-open-button.component";
|
||||
import { useHistory } from "react-router-dom";
|
||||
export default function JobsList({
|
||||
searchTextState,
|
||||
|
||||
refetch,
|
||||
loading,
|
||||
jobs,
|
||||
total,
|
||||
}) {
|
||||
export default function JobsList({ refetch, loading, jobs, total }) {
|
||||
const search = queryString.parse(useLocation().search);
|
||||
const { page, sortcolumn, sortorder } = search;
|
||||
const history = useHistory();
|
||||
@@ -26,8 +20,6 @@ export default function JobsList({
|
||||
});
|
||||
|
||||
const { t } = useTranslation();
|
||||
const setSearchText = searchTextState[1];
|
||||
|
||||
const columns = [
|
||||
{
|
||||
title: t("jobs.fields.ro_number"),
|
||||
@@ -195,8 +187,9 @@ export default function JobsList({
|
||||
</Button>
|
||||
<Input.Search
|
||||
placeholder={t("general.labels.search")}
|
||||
onChange={(e) => {
|
||||
setSearchText(e.target.value);
|
||||
onSearch={(value) => {
|
||||
search.search = value;
|
||||
history.push({ search: queryString.stringify(search) });
|
||||
}}
|
||||
enterButton
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user