@@ -88,8 +88,10 @@ function formFieldConfig(
88
88
{
89
89
key : 'referenceBuild' ,
90
90
type : 'reference-build-select' ,
91
- props : {
92
- required : true ,
91
+ expressions : {
92
+ 'props.required' : ( field ) =>
93
+ Boolean ( field . model . fivePrimeTranscript ) ||
94
+ Boolean ( field . model . threePrimeTranscript ) ,
93
95
} ,
94
96
} ,
95
97
{
@@ -107,7 +109,11 @@ function formFieldConfig(
107
109
label : 'Ensembl Version' ,
108
110
description :
109
111
'Enter a valid Ensembl database version (e.g. 75)' ,
110
- required : true ,
112
+ } ,
113
+ expressions : {
114
+ 'props.required' : ( field ) =>
115
+ Boolean ( field . model . fivePrimeTranscript ) ||
116
+ Boolean ( field . model . threePrimeTranscript ) ,
111
117
} ,
112
118
} ,
113
119
] ,
@@ -125,11 +131,14 @@ function formFieldConfig(
125
131
type : 'base-input' ,
126
132
props : {
127
133
label : "5' Transcript" ,
128
- required : ! fivePrimeDisabled ,
129
134
disabled : fivePrimeDisabled ,
130
135
tooltip :
131
136
"Specify a transcript ID, including version number (e.g. ENST00000348159.4) for the 5' exon you have selected" ,
132
137
} ,
138
+ expressions : {
139
+ 'props.required' : ( field ) =>
140
+ Boolean ( field . model . fivePrimeExonEnd ) ,
141
+ } ,
133
142
validators : {
134
143
isTranscriptId : {
135
144
expression : isEnsemblTranscript ,
@@ -149,11 +158,14 @@ function formFieldConfig(
149
158
} ,
150
159
props : {
151
160
label : "5' End Exon" ,
152
- required : ! fivePrimeDisabled ,
153
161
disabled : fivePrimeDisabled ,
154
162
tooltip :
155
163
'The exon number counted from the 5’ end of the transcript.' ,
156
164
} ,
165
+ expressions : {
166
+ 'props.required' : ( field ) =>
167
+ Boolean ( field . model . fivePrimeTranscript ) ,
168
+ } ,
157
169
} ,
158
170
{
159
171
key : 'fivePrimeOffset' ,
@@ -205,7 +217,6 @@ function formFieldConfig(
205
217
key : 'threePrimeTranscript' ,
206
218
type : 'base-input' ,
207
219
props : {
208
- required : ! threePrimeDisabled ,
209
220
disabled : threePrimeDisabled ,
210
221
label : "3' Transcript" ,
211
222
tooltip :
@@ -218,6 +229,10 @@ function formFieldConfig(
218
229
"3' Transcript must be a valid, human, versioned, Ensembl transcript ID" ,
219
230
} ,
220
231
} ,
232
+ expressions : {
233
+ 'props.required' : ( field ) =>
234
+ Boolean ( field . model . threePrimeExonStart ) ,
235
+ } ,
221
236
} ,
222
237
{
223
238
key : 'threePrimeExonStart' ,
@@ -232,9 +247,12 @@ function formFieldConfig(
232
247
label : "3' Start Exon" ,
233
248
tooltip :
234
249
'The exon number counted from the 3’ end of the transcript.' ,
235
- required : ! threePrimeDisabled ,
236
250
disabled : threePrimeDisabled ,
237
251
} ,
252
+ expressions : {
253
+ 'props.required' : ( field ) =>
254
+ Boolean ( field . model . threePrimeTranscript ) ,
255
+ } ,
238
256
} ,
239
257
{
240
258
key : 'threePrimeOffset' ,
0 commit comments