Skip to content

Commit

Permalink
Fixed search in task page (#2004)
Browse files Browse the repository at this point in the history
  • Loading branch information
fahad-aot authored Apr 5, 2024
1 parent db86004 commit aa9b370
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ const TaskFilterViewComponent = React.memo(
const { t } = useTranslation();
const [assigneeOptions, setAssigneeOptions] = useState([]);
const [inputValuesPresent, setInputValuesPresent] = useState(false); // State to track any input value is present or not
const selectedFilter = useSelector((state) => state.bpmTasks.selectedFilter);

const handleClick = (e) => {
if (createSearchNode?.current?.contains(e.target)) {
Expand Down Expand Up @@ -157,10 +156,6 @@ const TaskFilterViewComponent = React.memo(
}, [assignee, candidateGroup, processVariables, dueStartDate, dueEndDate,
followStartDate, followEndDate, createdStartDate, createdEndDate, priority]);

useEffect(() => {
//The search fields get clear when switching the filter
setFilterParams({});
}, [selectedFilter]);

const handleDueStartDateChange = (date) => {
setDueStartDate(date);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ const TaskSearchBarListView = React.memo(({ toggleAllTaskVariables }) => {
const [filterParams, setFilterParams] = useState({});
const taskList = useSelector((state) => state.bpmTasks.tasksList);
const allTaskVariablesExpanded = useSelector((state) => state.bpmTasks.allTaskVariablesExpand);
const selectedFilter = useSelector((state) => state.bpmTasks.selectedFilter);
const dispatch = useDispatch();
const { t } = useTranslation();
useEffect(() => {
Expand All @@ -29,6 +30,11 @@ const TaskSearchBarListView = React.memo(({ toggleAllTaskVariables }) => {
});
dispatch(setSelectedTaskVariables(taskVaribles));
}, [taskList]);

useEffect(() => {
//The search fields get clear when switching the filter
setFilterParams({});
}, [selectedFilter]);

return (
<>
Expand Down

0 comments on commit aa9b370

Please sign in to comment.