@@ -148,10 +148,11 @@ export default class CustomDesign extends Component<DesignProps, State> {
148148 value = { this . state . params . description ?. question }
149149 placeholder = "Explain your research question here."
150150 onChange = { ( event , data ) => {
151- if ( ! isString ( data . value ) ) {
151+ const val = data . value ;
152+ if ( ! isString ( val ) ) {
152153 return ;
153154 }
154- this . handleSetText ( data . value , 'question' ) ;
155+ this . handleSetText ( val as string , 'question' ) ;
155156 } }
156157 />
157158 </ Form >
@@ -172,10 +173,11 @@ export default class CustomDesign extends Component<DesignProps, State> {
172173 value = { this . state . params . description ?. hypothesis }
173174 placeholder = "Describe your hypothesis here."
174175 onChange = { ( event , data ) => {
175- if ( ! isString ( data . value ) ) {
176+ const val = data . value ;
177+ if ( ! isString ( val ) ) {
176178 return ;
177179 }
178- this . handleSetText ( data . value , 'hypothesis' ) ;
180+ this . handleSetText ( val as string , 'hypothesis' ) ;
179181 } }
180182 />
181183 </ Form >
@@ -196,10 +198,11 @@ export default class CustomDesign extends Component<DesignProps, State> {
196198 value = { this . state . params . description ?. methods }
197199 placeholder = "Explain how you will design your experiment to answer the question here."
198200 onChange = { ( event , data ) => {
199- if ( ! isString ( data . value ) ) {
201+ const val = data . value ;
202+ if ( ! isString ( val ) ) {
200203 return ;
201204 }
202- this . handleSetText ( data . value , 'methods' ) ;
205+ this . handleSetText ( val as string , 'methods' ) ;
203206 } }
204207 />
205208 </ Form >
@@ -563,11 +566,12 @@ export default class CustomDesign extends Component<DesignProps, State> {
563566 value = { this . state . params . intro }
564567 placeholder = "e.g., You will view a series of faces and houses. Press 1 when a face appears and 9 for a house. Press the the space bar on your keyboard to start doing the practice trials. If you want to skip the practice trials and go directly to the task, press the 'q' button on your keyboard."
565568 onChange = { ( event , data ) => {
566- if ( ! isString ( data . value ) ) {
569+ const val = data . value ;
570+ if ( ! isString ( val ) ) {
567571 return ;
568572 }
569573 this . setState ( {
570- params : { ...this . state . params , intro : data . value } ,
574+ params : { ...this . state . params , intro : val as string } ,
571575 saved : false ,
572576 } ) ;
573577 } }
@@ -593,11 +597,12 @@ export default class CustomDesign extends Component<DesignProps, State> {
593597 value = { this . state . params . taskHelp }
594598 placeholder = "e.g., Press 1 for a face and 9 for a house"
595599 onChange = { ( event , data ) => {
596- if ( ! isString ( data . value ) ) {
600+ const val = data . value ;
601+ if ( ! isString ( val ) ) {
597602 return ;
598603 }
599604 this . setState ( {
600- params : { ...this . state . params , taskHelp : data . value } ,
605+ params : { ...this . state . params , taskHelp : val as string } ,
601606 saved : false ,
602607 } ) ;
603608 } }
0 commit comments