Skip to content

Commit

Permalink
Allow push/jump to also refresh
Browse files Browse the repository at this point in the history
  • Loading branch information
daviscabral committed Sep 6, 2018
1 parent d2eebbb commit 9c2cd4d
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/navigationStore.js
Original file line number Diff line number Diff line change
Expand Up @@ -866,13 +866,19 @@ class NavigationStore {
};

push = (routeName, data) => {
const params = filterParam(data);
const { refresh, ...params } = filterParam(data);
this.dispatch({ type: StackActions.PUSH, routeName, params });
if (refresh) {
this.refresh(refresh);
}
};

jump = (routeName, data) => {
const params = filterParam(data);
const { refresh, ...params } = filterParam(data);
this.dispatch({ type: NavigationActions.NAVIGATE, routeName, params });
if (refresh) {
this.refresh(refresh);
}
};

drawerOpen = () => {
Expand Down

0 comments on commit 9c2cd4d

Please sign in to comment.