Skip to content

Commit f758a51

Browse files
MDE/PKFE-31 select changes during file selection
1 parent 9a0b879 commit f758a51

File tree

3 files changed

+10
-22
lines changed

3 files changed

+10
-22
lines changed

app/front-end/src/features/editor/components/toolbarView/toolbarGroupButtons/mergeGroupButtons.tsx

Lines changed: 6 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,9 @@ export const MergeGroupButtons: React.FC<MergeGroupButtonsProps> = () => {
2222
const mergeLovdAndGnomadClick = useCallback(async () => {
2323
clinvarErrorStateUpdate('');
2424

25-
if (!lovdFile) {
26-
lovdErrorStateUpdate('Please select a LOVD file');
27-
return;
28-
}
29-
30-
if (!gnomadFile) {
31-
gnomadErrorStateUpdate('Please select a gnomAD file');
32-
return;
33-
}
25+
if (!lovdFile) lovdErrorStateUpdate('Please select a LOVD file');
26+
if (!gnomadFile) gnomadErrorStateUpdate('Please select a gnomAD file');
27+
if (!lovdFile || !gnomadFile) return;
3428

3529
blockedStateUpdate(true);
3630

@@ -57,15 +51,9 @@ export const MergeGroupButtons: React.FC<MergeGroupButtonsProps> = () => {
5751
const mergeLovdAndClinvarClick = useCallback(async () => {
5852
gnomadErrorStateUpdate('');
5953

60-
if (!lovdFile) {
61-
lovdErrorStateUpdate('Please select a LOVD file');
62-
return;
63-
}
64-
65-
if (!clinvarFile) {
66-
clinvarErrorStateUpdate('Please select a ClinVar file');
67-
return;
68-
}
54+
if (!lovdFile) lovdErrorStateUpdate('Please select a LOVD file');
55+
if (!clinvarFile) clinvarErrorStateUpdate('Please select a ClinVar file');
56+
if (!lovdFile || !clinvarFile) return;
6957

7058
blockedStateUpdate(true);
7159

app/front-end/src/features/editor/components/toolbarView/toolbarGroupParams/applyGroupParams.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ export const ApplyGroupParams: React.FC<ApplyGroupParamsProps> = () => {
8080
: Theme.palette.text.primary,
8181
}}
8282
>
83-
{applyError ? applyError : 'Apply To'}
83+
{'Apply To'}
8484
</StyledGroupParamsInputLabel>
8585
<StyledGroupParamsSelect
8686
id={'lovd-file-select'}

app/front-end/src/features/editor/components/toolbarView/toolbarGroupParams/mergeGroupParams.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ export const MergeGroupParams: React.FC<MergeGroupParamsProps> = () => {
106106
: Theme.palette.text.primary,
107107
}}
108108
>
109-
{lovdError ? lovdError : 'Lovd File'}
109+
{'Lovd File'}
110110
</StyledGroupParamsInputLabel>
111111
<StyledGroupParamsSelect
112112
id={'lovd-file-select'}
@@ -156,7 +156,7 @@ export const MergeGroupParams: React.FC<MergeGroupParamsProps> = () => {
156156
: Theme.palette.text.primary,
157157
}}
158158
>
159-
{clinvarError ? clinvarError : 'Clinvar File'}
159+
{'Clinvar File'}
160160
</StyledGroupParamsInputLabel>
161161
<StyledGroupParamsSelect
162162
id={'clinvar-file-select'}
@@ -206,7 +206,7 @@ export const MergeGroupParams: React.FC<MergeGroupParamsProps> = () => {
206206
: Theme.palette.text.primary,
207207
}}
208208
>
209-
{gnomadError ? gnomadError : 'Gnomad File'}
209+
{'Gnomad File'}
210210
</StyledGroupParamsInputLabel>
211211
<StyledGroupParamsSelect
212212
id={'gnomad-file-select'}

0 commit comments

Comments
 (0)