Skip to content

Commit 8a91747

Browse files
fix(PatternLayout): Fix call to patternDateTimeFilterChange.
Fix #789
1 parent 4d53b59 commit 8a91747

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

lib/manager/components/reporter/components/PatternLayout.js

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,13 @@ import * as filterActions from '../../../../gtfs/actions/filter'
1919
import * as patternsActions from '../../../../gtfs/actions/patterns'
2020
import * as routesActions from '../../../../gtfs/actions/routes'
2121
import * as timetablesActions from '../../../../gtfs/actions/timetables'
22-
import TripsPerHourChart from './TripsPerHourChart'
23-
2422
import type {Props as ContainerProps} from '../containers/Patterns'
2523
import type {FetchStatus} from '../../../../types'
2624
import type {AllRoutesSubState, RouteListItem} from '../../../../types/reducers'
2725
import type {PatternRowData} from '../../../selectors'
2826

27+
import TripsPerHourChart from './TripsPerHourChart'
28+
2929
type Props = ContainerProps & {
3030
fetchRoutes: typeof routesActions.fetchRoutes,
3131
fetchStatus: FetchStatus,
@@ -47,6 +47,11 @@ export default class PatternLayout extends Component<Props> {
4747
}
4848
}
4949

50+
_onDateTimeFilterChange = () => {
51+
const {namespace, patternDateTimeFilterChange} = this.props
52+
patternDateTimeFilterChange(namespace)
53+
}
54+
5055
_onSelectRoute = (newRoute: ?RouteListItem) => {
5156
const {namespace, patternRouteFilterChange} = this.props
5257
patternRouteFilterChange(namespace, newRoute ? newRoute.route_id : undefined)
@@ -60,7 +65,6 @@ export default class PatternLayout extends Component<Props> {
6065
fetching
6166
},
6267
patternData,
63-
patternDateTimeFilterChange,
6468
routeFilter,
6569
routes,
6670
selectTab,
@@ -97,7 +101,7 @@ export default class PatternLayout extends Component<Props> {
97101
</Row>
98102
<ActiveDateTimeFilter
99103
hideDateTimeField
100-
onChange={patternDateTimeFilterChange}
104+
onChange={this._onDateTimeFilterChange}
101105
version={version} />
102106
</div>
103107
}

0 commit comments

Comments
 (0)