-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix dismiss modal not hiding properly with searchBar on iOS (#7087)
The problem was that `dismissModal` first dismissed the UISearchController and not the actual modal. Fixed by manually dismiss the search controller first and only then dismiss the modal. Closes: #7086 Co-authored-by: Julien Brayere <[email protected]> Co-authored-by: Yogev Ben David <[email protected]>
- Loading branch information
1 parent
1f6c8ba
commit 711e670
Showing
12 changed files
with
133 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -187,4 +187,4 @@ | |
} | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
import React from 'react'; | ||
import { NavigationComponentProps } from 'react-native-navigation'; | ||
import Button from '../components/Button'; | ||
import Root from '../components/Root'; | ||
import Navigation from '../services/Navigation'; | ||
import testIDs from '../testIDs'; | ||
|
||
const { SHOW_SEARCH_BAR_BTN, HIDE_SEARCH_BAR_BTN, TOP_BAR } = testIDs; | ||
|
||
interface Props extends NavigationComponentProps {} | ||
|
||
export default class SearchBarModal extends React.Component<Props> { | ||
static options() { | ||
return { | ||
topBar: { | ||
visible: true, | ||
testID: TOP_BAR, | ||
title: { | ||
text: 'SearchBar Modal Options', | ||
}, | ||
}, | ||
}; | ||
} | ||
|
||
state = { | ||
isAndroidNavigationBarVisible: true, | ||
}; | ||
|
||
render() { | ||
return ( | ||
<Root componentId={this.props.componentId}> | ||
{/* <Button label="Hide TopBar" testID={HIDE_TOP_BAR_BTN} onPress={this.hideTopBar} /> */} | ||
{/* <Button label="Show TopBar" testID={SHOW_TOP_BAR_BTN} onPress={this.showTopBar} /> */} | ||
<Button label="Hide SearchBar" testID={HIDE_SEARCH_BAR_BTN} onPress={this.hideSearchBar} /> | ||
<Button label="Show SearchBar" testID={SHOW_SEARCH_BAR_BTN} onPress={this.showSearchBar} /> | ||
</Root> | ||
); | ||
} | ||
|
||
hideSearchBar = () => | ||
Navigation.mergeOptions(this, { | ||
topBar: { | ||
searchBar: { | ||
visible: false, | ||
}, | ||
}, | ||
}); | ||
|
||
showSearchBar = () => | ||
Navigation.mergeOptions(this, { | ||
topBar: { | ||
searchBar: { | ||
visible: true, | ||
}, | ||
}, | ||
}); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters