File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
src/notebook/components/cell/display-area Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ export default class Display extends React.Component {
25
25
transforms,
26
26
displayOrder,
27
27
isHidden : false ,
28
- expanded : true ,
28
+ expanded : false ,
29
29
} ;
30
30
31
31
constructor ( ) {
@@ -51,6 +51,12 @@ export default class Display extends React.Component {
51
51
return true ;
52
52
}
53
53
54
+ // Since expanded is a boolean, we need to make sure it's a property directly.
55
+ if ( { } . hasOwnProperty . call ( nextProps , 'expanded' ) &&
56
+ nextProps . expanded !== this . props . expanded ) {
57
+ return true ;
58
+ }
59
+
54
60
return false ;
55
61
}
56
62
@@ -59,7 +65,7 @@ export default class Display extends React.Component {
59
65
}
60
66
61
67
recomputeStyle ( ) {
62
- if ( this . el . scrollHeight > DEFAULT_SCROLL_HEIGHT ) {
68
+ if ( ! this . props . expanded && this . el . scrollHeight > DEFAULT_SCROLL_HEIGHT ) {
63
69
this . el . style . height = `${ DEFAULT_SCROLL_HEIGHT } px` ;
64
70
this . el . style . overflowY = 'scroll' ;
65
71
return ;
You can’t perform that action at this time.
0 commit comments