Skip to content

Commit 98ecc07

Browse files
committed
hide the back button on Android
1 parent dfc11b0 commit 98ecc07

File tree

3 files changed

+4
-0
lines changed

3 files changed

+4
-0
lines changed

source/views/components/searchbar/index.android.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ const styles = StyleSheet.create({
2727
export class SearchBar extends React.Component<Props> {
2828
static defaultProps = {
2929
active: false,
30+
backButtonAndroid: true,
3031
onCancel: () => {},
3132
onChange: () => {},
3233
onFocus: () => {},
@@ -50,6 +51,7 @@ export class SearchBar extends React.Component<Props> {
5051
closeButton={this.props.active ? closeIcon : null}
5152
focusOnLayout={false}
5253
handleChangeText={this.props.onChange}
54+
hideBack={!this.props.backButtonAndroid}
5355
hideClose={!this.props.active}
5456
input={this.props.value}
5557
onBack={this.props.onCancel}

source/views/components/searchbar/types.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
export type Props = {
44
getRef?: any,
55
active?: boolean,
6+
backButtonAndroid?: boolean,
67
backgroundColor?: string,
78
onCancel: () => any,
89
onChange: string => any,

source/views/sis/components/animated-searchbox.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@ export class AnimatedSearchbox extends React.Component<Props> {
118118
<Animated.View style={searchStyle}>
119119
<SearchBar
120120
active={this.props.active}
121+
backButtonAndroid={false}
121122
onCancel={this.handleCancel}
122123
onChange={this.props.onChange}
123124
onFocus={this.handleFocus}

0 commit comments

Comments
 (0)