Skip to content

Commit

Permalink
fixed select type for obs and bible
Browse files Browse the repository at this point in the history
  • Loading branch information
sijumoncy committed Oct 26, 2023
1 parent cf98e15 commit 03efb41
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ function CustomMultiComboBox({
// eslint-disable-next-line no-unused-vars
const [isActive, setIsActive] = useState(false);
if (customData.length === 1) {
setSelectedList(customData);
setSelectedList(customData[0]);
} else if (customData.length > 1) {
// eslint-disable-next-line no-nested-ternary
filteredData = (query === '')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,8 @@ function DownloadResourcePopUp({ selectResource, isOpenDonwloadPopUp, setIsOpenD
logger.debug('DownloadResourcePopUp.js', 'save filter and call fetch');
if (!downloadStarted) {
// setLoadFilterDiv(!loadFilterDiv);
if (selectedLangFilter.length > 0 && selectedTypeFilter.length > 0) {
if (selectedLangFilter.length > 0
&& (Array.isArray(selectedTypeFilter) ? selectedTypeFilter.length > 0 : selectedTypeFilter?.name)) {
await fetchResource(true);
} else {
setOpenSnackBar(true);
Expand Down Expand Up @@ -346,7 +347,7 @@ function DownloadResourcePopUp({ selectResource, isOpenDonwloadPopUp, setIsOpenD
multiSelect
/>
<div className="flex flex-wrap gap-2 mt-2 mb-2">
{ selectResource === 'bible' && selectedTypeFilter.map((type, idx) => (
{ selectResource === 'bible' && selectedTypeFilter?.map((type, idx) => (
<div
key={idx}
className="flex items-center justify-center gap-2 px-3 py-1 bg-gray-200 rounded-full"
Expand Down

0 comments on commit 03efb41

Please sign in to comment.