Fix android share extension channel switching and searching
This commit is contained in:
parent
2ed45dbe28
commit
e3e2456ecd
2 changed files with 23 additions and 25 deletions
|
|
@ -70,11 +70,6 @@ export default class SearchBarAndroid extends PureComponent {
|
|||
isFocused: false,
|
||||
};
|
||||
}
|
||||
componentWillReceiveProps(nextProps) {
|
||||
if (this.state.value !== nextProps.value) {
|
||||
this.setState({value: nextProps.value});
|
||||
}
|
||||
}
|
||||
|
||||
cancel = () => {
|
||||
this.onCancelButtonPress();
|
||||
|
|
@ -153,10 +148,12 @@ export default class SearchBarAndroid extends PureComponent {
|
|||
} = this.props;
|
||||
const {isFocused} = this.state;
|
||||
|
||||
const inputNoBackground = {
|
||||
...inputStyle,
|
||||
};
|
||||
Reflect.deleteProperty(inputNoBackground, 'backgroundColor');
|
||||
const {
|
||||
backgroundColor: bgColor, //eslint-disable-line no-unused-vars
|
||||
...otherStyles
|
||||
} = inputStyle;
|
||||
|
||||
const inputNoBackground = otherStyles;
|
||||
|
||||
let inputColor = styles.searchBarInput.backgroundColor;
|
||||
if (inputStyle) {
|
||||
|
|
|
|||
|
|
@ -129,21 +129,23 @@ export default class ExtensionTeam extends PureComponent {
|
|||
}
|
||||
|
||||
return (
|
||||
<SectionList
|
||||
sections={sections}
|
||||
ListHeaderComponent={this.renderSearchBar(styles)}
|
||||
ItemSeparatorComponent={this.renderItemSeparator}
|
||||
renderItem={this.renderItem}
|
||||
renderSectionHeader={this.renderSectionHeader}
|
||||
keyExtractor={this.keyExtractor}
|
||||
keyboardShouldPersistTaps='always'
|
||||
keyboardDismissMode='on-drag'
|
||||
initialNumToRender={10}
|
||||
maxToRenderPerBatch={10}
|
||||
stickySectionHeadersEnabled={true}
|
||||
scrollEventThrottle={100}
|
||||
windowSize={5}
|
||||
/>
|
||||
<View>
|
||||
{this.renderSearchBar(styles)}
|
||||
<SectionList
|
||||
sections={sections}
|
||||
ItemSeparatorComponent={this.renderItemSeparator}
|
||||
renderItem={this.renderItem}
|
||||
renderSectionHeader={this.renderSectionHeader}
|
||||
keyExtractor={this.keyExtractor}
|
||||
keyboardShouldPersistTaps='always'
|
||||
keyboardDismissMode='on-drag'
|
||||
initialNumToRender={10}
|
||||
maxToRenderPerBatch={10}
|
||||
stickySectionHeadersEnabled={true}
|
||||
scrollEventThrottle={100}
|
||||
windowSize={5}
|
||||
/>
|
||||
</View>
|
||||
);
|
||||
};
|
||||
|
||||
|
|
@ -188,7 +190,6 @@ export default class ExtensionTeam extends PureComponent {
|
|||
titleCancelColor={defaultTheme.centerChannelColor}
|
||||
onChangeText={this.handleSearch}
|
||||
autoCapitalize='none'
|
||||
value={this.state.term}
|
||||
/>
|
||||
</View>
|
||||
);
|
||||
|
|
|
|||
Loading…
Reference in a new issue