File tree Expand file tree Collapse file tree 3 files changed +6
-4
lines changed Expand file tree Collapse file tree 3 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -28,6 +28,7 @@ export class SearchBar extends React.Component<Props> {
2828 static defaultProps = {
2929 active : false ,
3030 backButtonAndroid : true ,
31+ androidIcon : null ,
3132 onCancel : ( ) => { } ,
3233 onChange : ( ) => { } ,
3334 onFocus : ( ) => { } ,
@@ -41,17 +42,18 @@ export class SearchBar extends React.Component<Props> {
4142 }
4243
4344 render ( ) {
45+ let { backButtonAndroid } = this . props
4446 let backButton = this . props . active ? backIcon : searchIcon
4547
4648 return (
4749 < NativeSearchBar
4850 ref = { this . handleRef }
4951 autoCorrect = { false }
50- backButton = { backButton }
52+ backButton = { backButtonAndroid === 'search' ? searchIcon : backButton }
5153 closeButton = { this . props . active ? closeIcon : null }
5254 focusOnLayout = { false }
5355 handleChangeText = { this . props . onChange }
54- hideBack = { ! this . props . backButtonAndroid }
56+ hideBack = { ! backButtonAndroid }
5557 hideClose = { ! this . props . active }
5658 input = { this . props . value }
5759 onBack = { this . props . onCancel }
Original file line number Diff line number Diff line change 33export type Props = {
44 getRef ?: any ,
55 active ?: boolean ,
6- backButtonAndroid ?: boolean ,
6+ backButtonAndroid ?: "search" | boolean ,
77 backgroundColor ?: string ,
88 onCancel : ( ) => any ,
99 onChange : string => any ,
Original file line number Diff line number Diff line change @@ -118,7 +118,7 @@ export class AnimatedSearchbox extends React.Component<Props> {
118118 < Animated . View style = { searchStyle } >
119119 < SearchBar
120120 active = { this . props . active }
121- backButtonAndroid = { false }
121+ backButtonAndroid = "search"
122122 onCancel = { this . handleCancel }
123123 onChange = { this . props . onChange }
124124 onFocus = { this . handleFocus }
You can’t perform that action at this time.
0 commit comments