@@ -191,7 +191,7 @@ const ExperimentEdit = (props) => {
191191 const [ experimentName , setExperimentName ] = useState ( '' ) ;
192192 const [ experimentNameError , setExperimentNameError ] = useState ( '' ) ;
193193 const [ selectionParams , setSelectionParams ] = useState ( [ ] ) ;
194- const [ trialNumberErrorDialogOpen , setTrialNumberErrorDialogOpen ] = useState ( false ) ;
194+ const [ trialNumberErrorDialogOpen , setTrialNumberErrorDialogOpen ] = useState ( { condition : false , number : 1 } ) ;
195195
196196 // Existing Experiment.
197197 const [ experiment , setExperiment ] = useState ( null ) ;
@@ -355,7 +355,7 @@ const ExperimentEdit = (props) => {
355355 } ) ;
356356
357357 if ( numberOfTrials > MAX_TRIALS ) {
358- setTrialNumberErrorDialogOpen ( true ) ;
358+ setTrialNumberErrorDialogOpen ( { condition : true , number : numberOfTrials } ) ;
359359 } else if ( editState ) {
360360 ExperimentsApi . editExperiment ( experiment ?. name , newExperimentDetails )
361361 . then ( ( ) => {
@@ -568,12 +568,12 @@ const ExperimentEdit = (props) => {
568568 </ Box >
569569 </ GridLayout >
570570 < DialogBox
571- open = { trialNumberErrorDialogOpen }
572- onDialogResponse = { ( ) => setTrialNumberErrorDialogOpen ( false ) }
571+ open = { trialNumberErrorDialogOpen . condition }
572+ onDialogResponse = { ( ) => setTrialNumberErrorDialogOpen ( { condition : false , number : 1 } ) }
573573 textForDialog = { {
574- heading : 'Error - Number of trials is too large' ,
575- content : `Please adjust your exploration parameters to
576- reduce the number of experiment trials to less than 100. Current number of trials : ${ numberOfTrials } ` ,
574+ heading : 'Error - Number of conditions is too large' ,
575+ content : `Please change your exploration parameters to
576+ reduce the number of experimental conditions to less than 100. Last number of conditions : ${ trialNumberErrorDialogOpen . number } ` ,
577577 } }
578578 />
579579 </ >
0 commit comments