refetch on param changes
parent
3ce53441f0
commit
be6d2a2dfc
|
@ -15,7 +15,10 @@ export default contain(
|
|||
getPayload: ({ hikes, params }) => ({
|
||||
isPrimed: (hikes && !!hikes.length),
|
||||
dashedName: params.dashedName
|
||||
})
|
||||
}),
|
||||
shouldContainerFetch(props, nextProps) {
|
||||
return props.params.dashedName !== nextProps.params.dashedName;
|
||||
}
|
||||
},
|
||||
stampit(React, {
|
||||
displayName: 'Hikes',
|
||||
|
|
|
@ -19,6 +19,7 @@ function getCurrentHike(hikes =[{}], dashedName, currentHike) {
|
|||
return currentHike;
|
||||
}
|
||||
|
||||
debug('setting new hike');
|
||||
return hikes
|
||||
.filter(({ dashedName }) => {
|
||||
return filterRegex.test(dashedName);
|
||||
|
|
Loading…
Reference in New Issue