[FIX] Search input not using the whole header space (#3012)
* [FIX] Search input not using the whole space * Fix on getHeaderTitlePosition Co-authored-by: Diego Mello <diegolmello@gmail.com>
This commit is contained in:
parent
8f0eae7a25
commit
632751898c
|
@ -23,7 +23,7 @@ export const getHeaderHeight = (isLandscape) => {
|
||||||
|
|
||||||
export const getHeaderTitlePosition = ({ insets, numIconsRight }) => ({
|
export const getHeaderTitlePosition = ({ insets, numIconsRight }) => ({
|
||||||
left: insets.left + 60,
|
left: insets.left + 60,
|
||||||
right: insets.right + (45 * numIconsRight)
|
right: insets.right + Math.max(45 * numIconsRight, 15)
|
||||||
});
|
});
|
||||||
|
|
||||||
const styles = StyleSheet.create({
|
const styles = StyleSheet.create({
|
||||||
|
|
|
@ -319,7 +319,7 @@ class RoomsListView extends React.Component {
|
||||||
getHeader = () => {
|
getHeader = () => {
|
||||||
const { searching } = this.state;
|
const { searching } = this.state;
|
||||||
const { navigation, isMasterDetail, insets } = this.props;
|
const { navigation, isMasterDetail, insets } = this.props;
|
||||||
const headerTitlePosition = getHeaderTitlePosition({ insets, numIconsRight: 3 });
|
const headerTitlePosition = getHeaderTitlePosition({ insets, numIconsRight: searching ? 0 : 3 });
|
||||||
return {
|
return {
|
||||||
headerTitleAlign: 'left',
|
headerTitleAlign: 'left',
|
||||||
headerLeft: () => (searching ? (
|
headerLeft: () => (searching ? (
|
||||||
|
|
Loading…
Reference in New Issue