Skip to content

Commit

Permalink
Merge pull request #846 from culturecreates/bugfix/issue-819
Browse files Browse the repository at this point in the history
fix: after the users checks filter the entity is moved up
  • Loading branch information
AbhishekPAnil authored Dec 6, 2023
2 parents fa890e0 + ed7e8d2 commit 37206ce
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/pages/Dashboard/Events/Events.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -388,6 +388,12 @@ function Events() {
if (filteredUsers?.includes(userData?._id)) return true;
else return false;
});

let uniqueArray = removeObjectArrayDuplicates(
[{ _id: user?.id, ...user }]?.concat(selectedUsersData)?.concat(usersData),
'_id',
);
setUsersData(uniqueArray);
setUserFilter(filteredUsers);
setPageNumber(1);
};
Expand All @@ -403,6 +409,8 @@ function Events() {
if (filteredOrganizers?.includes(organizerData?.id)) return true;
else return false;
});
let uniqueArray = removeObjectArrayDuplicates(selectedOrganizersData?.concat(organizersData), 'id');
setOrganizersData(uniqueArray);
setOrganizerFilter(filteredOrganizers);
setPageNumber(1);
};
Expand Down

0 comments on commit 37206ce

Please sign in to comment.