Skip to content
This repository has been archived by the owner on Apr 13, 2023. It is now read-only.

Commit

Permalink
pass through refetch args (#24)
Browse files Browse the repository at this point in the history
  • Loading branch information
James Baxley committed Apr 20, 2016
1 parent 7e8c3b3 commit ae99b55
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/connect.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ export default function connect(opts?: ConnectOptions) {
// since we don't have the query id, we can manually handle
// a lifecyle event for loading if this query is refetched
const createBoundRefetch = (dataKey, refetchMethod) => {
return () => {
return (...args) => {
this.data[dataKey] = assign(this.data[dataKey], {
loading: true,
refetch,
Expand All @@ -258,7 +258,7 @@ export default function connect(opts?: ConnectOptions) {
// update state to latest of redux store
this.setState(this.store.getState());

refetchMethod();
refetchMethod(...args);
};
};

Expand Down

0 comments on commit ae99b55

Please sign in to comment.