无法在searchIcon道具中的react-native元素的seachbar上添加onPress

时间:2019-12-07 05:53:04

标签: javascript react-native react-native-android searchbar react-native-elements

<SearchBar
          containerStyle= {{backgroundColor: '#fff',borderWidth: 1}}
          inputContainerStyle= {{backgroundColor: '#fff'}}
          searchIcon={{ size: 24,name: this.state.searchIconName }}
          onChangeText={text => this.SearchFilterFunction(text)}
          onClear={text => this.SearchFilterFunction('')}
          placeholder="Type Here..."
          value={this.state.search}
          />
          <FlatList
          data={this.state.dataSource}
          ItemSeparatorComponent={this.ListViewItemSeparator}
          renderItem={({ item }) => (
            <Text style={styles.textStyle}>{item.title}</Text>
          )}
          enableEmptySections={true}
          style={{ marginTop: 10 }}
          keyExtractor={(item, index) => index.toString()}
        />

我想在更改时替换searchIcon。

searchIcon = {{size:24}} enter image description he[enter image description here] 1 re

0 个答案:

没有答案