Skip to content

Commit

Permalink
fix(UIView): Do not reload view if the new viewConfig is identical to…
Browse files Browse the repository at this point in the history
… the old one
  • Loading branch information
christopherthielen committed Feb 12, 2018
1 parent 07608f3 commit 07a03bf
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/components/UIView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -226,9 +226,15 @@ export class UIView extends Component<UIViewProps, UIViewState> {
/**
* View config updated callback
*
* This is called by UI-Router when a state was activated, and one of its views targets this `UIView`
* This is called by UI-Router during ViewService.sync().
* The `newConfig` parameter will contain view configuration (component, etc) when a
* state is activated and one of its views targets this `UIView`.
*/
viewConfigUpdated(newConfig: ReactViewConfig) {
if (newConfig === this.uiViewData.config) {
return;
}

let newComponent =
newConfig && newConfig.viewDecl && newConfig.viewDecl.component;
let trans: Transition = undefined,
Expand Down

0 comments on commit 07a03bf

Please sign in to comment.