Skip to content

Commit b9cd90f

Browse files
authored
Merge pull request #1552 from StoDevX/filter-nav-title
Add titles to FilterView navigation bars
2 parents b24b221 + c433fa4 commit b9cd90f

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

source/views/components/filter/filter-view.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ type PropsType = {
1818
navigation: {
1919
state: {
2020
params: {
21+
title: string,
2122
pathToFilters: string[],
2223
onChange: (x: FilterType[]) => any,
2324
},
@@ -50,6 +51,11 @@ export function FilterViewComponent({filters, navigation}: PropsType) {
5051
</ScrollView>
5152
)
5253
}
54+
FilterViewComponent.navigationOptions = ({navigation}) => {
55+
return {
56+
title: navigation.state.params.title,
57+
}
58+
}
5359

5460
const mapStateToProps = (state, actualProps) => {
5561
return {

source/views/menus/components/fancy-menu.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ class FancyMenuView extends React.PureComponent {
7272

7373
openFilterView = () => {
7474
this.props.navigation.navigate('FilterView', {
75+
title: `Filter ${this.props.name} menu`,
7576
pathToFilters: ['menus', this.props.name],
7677
onChange: filters => this.props.onFiltersChange(filters),
7778
})

0 commit comments

Comments
 (0)