NativeBase icon indicating copy to clipboard operation
NativeBase copied to clipboard

Search Bar without button (full width)

Open joinjoohny opened this issue 9 years ago • 7 comments

How to make search bar, the full width of header without button search. <Button transparent> Search </Button> If I remove the button search, search bar displayed incorrectly.

rns

"react-native": "0.35.0" "native-base": "0.5.11"

Thx.

joinjoohny avatar Feb 03 '17 17:02 joinjoohny

+1

manfredxu99 avatar Feb 25 '17 05:02 manfredxu99

+2

bgdavidx avatar Feb 25 '17 05:02 bgdavidx

@manfredxu99 @bgdavidx @joinjoohny you guys can try

<Header searchBar rounded>
   <Item>
          <Icon name="ios-search" />
          <Input placeholder="Search"  />
          <Icon name="ios-people" />
  </Item>
</Header>

the above will work for you .

geekrishabh avatar Apr 14 '17 12:04 geekrishabh

not working for me too. Same issue. "native-base": "^2.1.1", "react-native": "0.43.2",

nikunjbansal avatar Apr 14 '17 13:04 nikunjbansal

@nixalite if you have ejected NB theme, you need to merge it with the new theme as the older theme doesn't have input component theme . you can add input.js in your ejected theme and include it in theme index.js this way

geekrishabh avatar Apr 14 '17 14:04 geekrishabh

Closing this as the above should resolve the issue in v2.x Let me know if it doesn't

shivrajkumar avatar Apr 19 '17 18:04 shivrajkumar

      <Body style={{flex:5}}>
         <Item >
         <Icon name="search"  style={{color:'#fff'}} />
         <Input placeholder="Search Items Here..."  placeholderTextColor="#fff" style={{width:300}}/>
         <Icon name="people"  style={{color:'#fff'}} />
       </Item>
      </Body>
      <Right style={{flex:1}}>
            <Icon name="home"  style={{color:'#fff'}}/>
          </Right>
    </Header>

sangampokharel avatar Aug 17 '19 06:08 sangampokharel