Nativebase: Vertical alignment of Items in Header on iPhone X

Created on 12 Jul 2018  路  5Comments  路  Source: GeekyAnts/NativeBase

I'm using native-base to build the header of my app. Since I updated to version 2.7.1 the Items are displayed too high in the Header on iPhone X (see screenshot).

Here is how it looks on v2.7.1
header

Here is how I expect it to look (this is v2.3.9)
previous

Notice how the search bar is now much closer to the notch.

To reproduce this just render the following view:

    <Container>
        <Header searchBar>
          <Button transparent>
            <Icon name="ios-people" />
          </Button>
          <Item>
            <Icon name="ios-search" />
            <Input placeholder="Search" />
          </Item>
          <Button transparent>
            <Text>Search</Text>
          </Button>
        </Header>
    </Container>

Versions:
node: 9.11.2
npm: 5.6.0
react-native: 0.55.4 & 0.56
react: 16.3.2 & 16.4.1
native-base version: 2.7.1

Most helpful comment

development branch do not have up-to-date transpiled code
either in package.json, modify main from dist/src/index.js to src/index.js
or transpile the code and then check

All 5 comments

@alexisbronchart if you have ejected theme, try changing the topInset value to 39

@akhil-geekyants I thought about that too but the project from which I took the screenshots doesn't have an ejected theme.

I just tried again with the development branch, looks like it still doesn't work.

development branch do not have up-to-date transpiled code
either in package.json, modify main from dist/src/index.js to src/index.js
or transpile the code and then check

Fixed with 2.7.2

Was this page helpful?
0 / 5 - 0 ratings

Related issues

agersoncgps picture agersoncgps  路  3Comments

Cotel picture Cotel  路  3Comments

bsiddiqui picture bsiddiqui  路  3Comments

aloifolia picture aloifolia  路  3Comments

georgemickael-b picture georgemickael-b  路  3Comments