Fix unnecessary re-rendering of various components when typing in web UI (#15286)
This commit is contained in:
		
					parent
					
						
							
								48bef17cc9
							
						
					
				
			
			
				commit
				
					
						9620ee90be
					
				
			
		
					 6 changed files with 43 additions and 23 deletions
				
			
		|  | @ -99,8 +99,13 @@ class ColumnsArea extends ImmutablePureComponent { | |||
|     if (this.props.singleColumn !== prevProps.singleColumn && !this.props.singleColumn) { | ||||
|       this.node.addEventListener('wheel', this.handleWheel, supportsPassiveEvents ? { passive: true } : false); | ||||
|     } | ||||
|     this.lastIndex = getIndex(this.context.router.history.location.pathname); | ||||
|     this.setState({ shouldAnimate: true }); | ||||
| 
 | ||||
|     const newIndex = getIndex(this.context.router.history.location.pathname); | ||||
| 
 | ||||
|     if (this.lastIndex !== newIndex) { | ||||
|       this.lastIndex = newIndex; | ||||
|       this.setState({ shouldAnimate: true }); | ||||
|     } | ||||
|   } | ||||
| 
 | ||||
|   componentWillUnmount () { | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue