File tree Expand file tree Collapse file tree 2 files changed +12
-9
lines changed 
arduino-ide-extension/src/browser/serial/monitor Expand file tree Collapse file tree 2 files changed +12
-9
lines changed Original file line number Diff line number Diff line change @@ -117,6 +117,11 @@ export class MonitorWidget extends ReactWidget {
117117    ( this . focusNode  ||  this . node ) . focus ( ) ; 
118118  } 
119119
120+   protected  override  onAfterShow ( msg : Message ) : void { 
121+     super . onAfterShow ( msg ) ; 
122+     this . update ( ) ; 
123+   } 
124+ 
120125  protected  onFocusResolved  =  ( element : HTMLElement  |  undefined )  =>  { 
121126    if  ( this . closing  ||  ! this . isAttached )  { 
122127      return ; 
Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ export class SerialMonitorOutput extends React.Component<
1717   * Do not touch it. It is used to be able to "follow" the serial monitor log. 
1818   */ 
1919  protected  toDisposeBeforeUnmount  =  new  DisposableCollection ( ) ; 
20-   private  listRef : React . RefObject < any > ; 
20+   private  listRef : React . RefObject < List > ; 
2121
2222  constructor ( props : Readonly < SerialMonitorOutput . Props > )  { 
2323    super ( props ) ; 
@@ -34,12 +34,10 @@ export class SerialMonitorOutput extends React.Component<
3434      < List 
3535        className = "serial-monitor-messages" 
3636        height = { this . props . height } 
37-         itemData = { 
38-           { 
39-             lines : this . state . lines , 
40-             timestamp : this . state . timestamp , 
41-           }  as  any 
42-         } 
37+         itemData = { { 
38+           lines : this . state . lines , 
39+           timestamp : this . state . timestamp , 
40+         } } 
4341        itemCount = { this . state . lines . length } 
4442        itemSize = { 18 } 
4543        width = { '100%' } 
@@ -93,11 +91,11 @@ export class SerialMonitorOutput extends React.Component<
9391    this . toDisposeBeforeUnmount . dispose ( ) ; 
9492  } 
9593
96-   scrollToBottom  =  ( ( ) :  void =>  { 
94+   private   readonly   scrollToBottom  =  ( )  =>  { 
9795    if  ( this . listRef . current  &&  this . props . monitorModel . autoscroll )  { 
9896      this . listRef . current . scrollToItem ( this . state . lines . length ,  'end' ) ; 
9997    } 
100-   } ) . bind ( this ) ; 
98+   } ; 
10199} 
102100
103101const  _Row  =  ( { 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments