pramod_Bug-#203 -preserve selected employees when filtering by role in Daily Task Planning #91

Merged
vikas.nale merged 2 commits from pramod_Bug-#203 into Issue_May_2W 2025-05-10 10:41:25 +00:00
Collaborator

Issue
In the AssignRole ,Daily Task Planning module, when a user applied a filter by designation (role), the previously selected employees were unintentionally removed. This occurred because the handleRoleChange function was resetting the selected employees list with setSelectedEmployees([]).

Fixed
Removed the setSelectedEmployees([]) line from the handleRoleChange function to retain the selected employees even after changing the designation filter. Now, filtering by role no longer clears existing selections.

const handleRoleChange = (event) => {
  reset();
  // setSelectedEmployees([]); // This line caused selected employees to be removed
  setSelectedRole(event.target.value);
};
**Issue** In the AssignRole ,Daily Task Planning module, when a user applied a filter by designation (role), the previously selected employees were unintentionally removed. This occurred because the handleRoleChange function was resetting the selected employees list with setSelectedEmployees([]). **Fixed** Removed the setSelectedEmployees([]) line from the handleRoleChange function to retain the selected employees even after changing the designation filter. Now, filtering by role no longer clears existing selections. ``` const handleRoleChange = (event) => { reset(); // setSelectedEmployees([]); // This line caused selected employees to be removed setSelectedRole(event.target.value); }; ```
pramod.mahajan added 2 commits 2025-05-09 16:55:17 +00:00
vikas.nale merged commit 68475f4742 into Issue_May_2W 2025-05-10 10:41:25 +00:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: admin/marco.pms.web#91
No description provided.