Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐛 FWF:3443 [Bugfix] Fixed invalid search results clearing issue #2134

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ const TaskSearchBarListView = React.memo(({ toggleAllTaskVariables }) => {
const taskList = useSelector((state) => state.bpmTasks.tasksList);
const allTaskVariablesExpanded = useSelector((state) => state.bpmTasks.allTaskVariablesExpand);
const selectedFilter = useSelector((state) => state.bpmTasks.selectedFilter);
const filterList = useSelector((state) => state.bpmTasks.filtersAndCount);
const taskFilter = filterList?.find((task)=>task.id === selectedFilter.id );
const taskFiltercount = taskFilter ? taskFilter.count : 0; //Current Task filter count
const dispatch = useDispatch();
const { t } = useTranslation();
useEffect(() => {
Expand All @@ -38,17 +41,19 @@ const TaskSearchBarListView = React.memo(({ toggleAllTaskVariables }) => {

return (
<>
{tasksCount > 0 ? (
<div className="d-flex justify-content-end filter-sort-bar mt-1">
<div className="sort-container task-filter-list-view">
{taskFiltercount > 0 && <div className="d-flex justify-content-end filter-sort-bar ">
{
tasksCount > 0 ? (
<>
<div className="sort-container task-filter-list-view">
<button
type="button"
className="btn btn-outline-secondary"
onClick={() => {
setSortOptions(!SortOptions);
setDisplayFilter(false);
}}
>
>
{t("Sort by")}
<svg
xmlns="http://www.w3.org/2000/svg"
Expand All @@ -66,8 +71,8 @@ const TaskSearchBarListView = React.memo(({ toggleAllTaskVariables }) => {
<TaskSortSelectedList />
</div>
)}
</div>
<div className="Select-Task-Variables task-filter-list-view">
</div>
<div className="Select-Task-Variables task-filter-list-view">
<button
type="button"
className="btn btn-outline-secondary"
Expand All @@ -89,8 +94,10 @@ const TaskSearchBarListView = React.memo(({ toggleAllTaskVariables }) => {
</svg>
{allTaskVariablesExpanded ? t("Collapse All") : t("Expand All")}
</button>
</div>

</div>
</>
) : null
}
<div className="filter-container-list task-filter-list-view">
<button
type="button"
Expand Down Expand Up @@ -123,8 +130,7 @@ const TaskSearchBarListView = React.memo(({ toggleAllTaskVariables }) => {
</div>
)}
</div>
</div>
) : null}
</div>}
</>
);
});
Expand Down
Loading