Skip to content

Commit

Permalink
[#906] administration duplicate error fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
abhishek-p-s committed Jan 12, 2024
1 parent efac822 commit d020015
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion frontend/src/components/filters/AdministrationDropdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,13 @@ const AdministrationDropdown = ({
fetchUserAdmin();
}, [fetchUserAdmin, persist]);

const handleChange = async (e) => {
const handleChange = async (e, index) => {
if (!e) {
return;
}
const { data: selectedAdm } = await api.get(`administration/${e}`);
store.update((s) => {
s.administration.length = index + 1;
s.administration = s.administration.concat(selectedAdm);
});
if (onChange) {
Expand Down

0 comments on commit d020015

Please sign in to comment.