Skip to content

Commit

Permalink
Merge pull request #217 from bible-technology/fix/search
Browse files Browse the repository at this point in the history
fixed search functionality in listing page .
  • Loading branch information
vipinpaul authored Nov 9, 2023
2 parents 4057221 + c194ea8 commit 138de7a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions renderer/src/components/Projects/ProjectList.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,14 @@ export default function ProjectList() {
callEditProject,
},
action: {
setProjects,
handleClickStarred,
setCallEditProject,
FetchProjects,
},
} = useContext(AutographaContext);
const [openPopUp, setOpenPopUp] = useState(false);
const [currentProject, setCurrentProject] = useState();
const [filteredProjects, setFilteredProjects] = useState(projects);
const openExportPopUp = (project) => {
setCurrentProject(project);
setOpenPopUp(true);
Expand Down Expand Up @@ -70,7 +70,7 @@ export default function ProjectList() {
contentList1={projects}
// contentList2={projects}
filterList={filterList}
onfilerRequest1={setProjects}
onfilerRequest1={setFilteredProjects}
// onfilerRequest2={setProjects}
/>
)}
Expand All @@ -88,7 +88,7 @@ export default function ProjectList() {
orderBy={orderBy}
onRequestSort={handleRequestSort}
/>
<ProjectRow projects={projects} order={order} orderBy={orderBy} showArchived={showArchived} openExportPopUp={openExportPopUp} setCurrentProject={setCurrentProject} handleClickStarred={handleClickStarred} />
<ProjectRow projects={filteredProjects} order={order} orderBy={orderBy} showArchived={showArchived} openExportPopUp={openExportPopUp} setCurrentProject={setCurrentProject} handleClickStarred={handleClickStarred} />
</table>
{(!projects) && <div><LoadingScreen /></div>}
</div>
Expand Down
2 changes: 1 addition & 1 deletion renderer/src/components/Projects/SearchTags.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export default function SearchTags({
// onfilerRequest2(contentList2);
}
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [query]);
}, [query, contentList1]);

return (
<div className="relative mx-5">
Expand Down

0 comments on commit 138de7a

Please sign in to comment.