fix: Rerender Bundle on route change (#4120)
This commit is contained in:
		
					parent
					
						
							
								46f5d3a2e9
							
						
					
				
			
			
				commit
				
					
						91cacb1e8f
					
				
			
		
					 1 changed files with 2 additions and 10 deletions
				
			
		|  | @ -31,13 +31,11 @@ export class WrappedRoute extends React.Component { | |||
|   } | ||||
| 
 | ||||
|   renderComponent = ({ match }) => { | ||||
|     this.match = match; // Needed for this.renderBundle
 | ||||
| 
 | ||||
|     const { component } = this.props; | ||||
|     const { component, content, multiColumn } = this.props; | ||||
| 
 | ||||
|     return ( | ||||
|       <BundleContainer fetchComponent={component} loading={this.renderLoading} error={this.renderError}> | ||||
|         {this.renderBundle} | ||||
|         {Component => <Component params={match.params} multiColumn={multiColumn}>{content}</Component>} | ||||
|       </BundleContainer> | ||||
|     ); | ||||
|   } | ||||
|  | @ -50,12 +48,6 @@ export class WrappedRoute extends React.Component { | |||
|     return <BundleColumnError {...props} />; | ||||
|   } | ||||
| 
 | ||||
|   renderBundle = (Component) => { | ||||
|     const { match: { params }, props: { content, multiColumn } } = this; | ||||
| 
 | ||||
|     return <Component params={params} multiColumn={multiColumn}>{content}</Component>; | ||||
|   } | ||||
| 
 | ||||
|   render () { | ||||
|     const { component: Component, content, ...rest } = this.props; | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue