@@ -151,7 +151,8 @@ class Matrix extends React.Component<Props, State> implements Widget {
151
151
inputPaths . push ( inputPath ) ;
152
152
}
153
153
}
154
-
154
+ // eslint-disable-next-line no-console
155
+ console . log ( "inputPaths" , inputPaths ) ;
155
156
return inputPaths ;
156
157
} ;
157
158
@@ -301,13 +302,17 @@ class Matrix extends React.Component<Props, State> implements Widget {
301
302
cb ,
302
303
) ;
303
304
this . props . trackInteraction ( ) ;
305
+ // eslint-disable-next-line no-console
306
+ console . log ( "onValueChange" , answers ) ;
304
307
} ;
305
308
306
309
/**
307
310
* TODO: remove this when everything is pulling from Renderer state
308
311
* @deprecated get user input from Renderer state
309
312
*/
310
313
getUserInput ( ) : PerseusMatrixUserInput {
314
+ // eslint-disable-next-line no-console
315
+ console . log ( "getUserInput" , this . props . userInput ) ;
311
316
return this . props . userInput ;
312
317
}
313
318
@@ -321,10 +326,13 @@ class Matrix extends React.Component<Props, State> implements Widget {
321
326
*/
322
327
getSerializedState ( ) : any {
323
328
const { userInput, ...rest } = this . props ;
324
- return {
329
+ const serializedState = {
325
330
...rest ,
326
331
answers : userInput . answers ,
327
332
} ;
333
+ // eslint-disable-next-line no-console
334
+ console . log ( "serializedState" , serializedState ) ;
335
+ return serializedState ;
328
336
}
329
337
330
338
render ( ) : React . ReactNode {
@@ -563,13 +571,15 @@ function getCorrectUserInput(
563
571
function getUserInputFromSerializedState (
564
572
serializedState : any ,
565
573
) : PerseusMatrixUserInput {
574
+ // eslint-disable-next-line no-console
575
+ console . log ( "getUserInputFromSerializedState" , serializedState ) ;
566
576
return { answers : serializedState . answers } ;
567
577
}
568
578
569
579
export default {
570
580
name : "matrix" ,
571
581
displayName : "Matrix" ,
572
- hidden : true ,
582
+ hidden : false ,
573
583
widget : Matrix ,
574
584
transform,
575
585
staticTransform : transform ,
0 commit comments