Skip to content

Commit

Permalink
Hotfix task sources (#38)
Browse files Browse the repository at this point in the history
* hotfix: task sources

* hotfix: filter options

---------

Co-authored-by: Jan <[email protected]>
  • Loading branch information
jdolkowski and Jan authored Feb 28, 2024
1 parent 7afa658 commit acd59c6
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/pickers/TaskSourcePicker.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import React from 'react';
import {
Autocomplete, useTranslations, useModulesManager,
Autocomplete,
useTranslations,
useModulesManager,
} from '@openimis/fe-core';
import { TASK_CONTRIBUTION_KEY } from '../constants';

Expand All @@ -16,7 +18,7 @@ function TaskSourcePicker({
const contributions = modulesManager.getContribs(TASK_CONTRIBUTION_KEY);
const sources = contributions.flatMap((contribution) => {
const source = contribution.taskSource;
return source ? [{ id: source, name: source }] : [];
return source ? source.map((item) => ({ id: item, name: item })) : [];
});

return (
Expand Down

0 comments on commit acd59c6

Please sign in to comment.