feat: Use CSS contain to avoid computations (#3158)
This commit is contained in:
		
					parent
					
						
							
								8c5eaf7ae9
							
						
					
				
			
			
				commit
				
					
						b369fc2de4
					
				
			
		
					 2 changed files with 8 additions and 1 deletions
				
			
		|  | @ -100,7 +100,9 @@ class Notifications extends React.PureComponent { | |||
|       unread = <div className='notifications__unread-indicator' />; | ||||
|     } | ||||
| 
 | ||||
|     if (isLoading || notifications.size > 0) { | ||||
|     if (isLoading && this.scrollableArea) { | ||||
|       scrollableArea = this.scrollableArea; | ||||
|     } else if (notifications.size > 0) { | ||||
|       scrollableArea = ( | ||||
|         <div className='scrollable' onScroll={this.handleScroll} ref={this.setRef}> | ||||
|           {unread} | ||||
|  | @ -119,6 +121,8 @@ class Notifications extends React.PureComponent { | |||
|       ); | ||||
|     } | ||||
| 
 | ||||
|     this.scrollableArea = scrollableArea; | ||||
| 
 | ||||
|     return ( | ||||
|       <Column icon='bell' active={isUnread} heading={intl.formatMessage(messages.title)}> | ||||
|         <ColumnSettingsContainer /> | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue