Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clear icon does no clear text #19

Open
PaddyLock opened this issue Jul 13, 2018 · 3 comments
Open

Clear icon does no clear text #19

PaddyLock opened this issue Jul 13, 2018 · 3 comments

Comments

@PaddyLock
Copy link

Hi, if I add a clear icon, when I press it doesn't clear the text. I am testing with expo in IOS simulator

<SearchInput
onChangeText={(term) => { this.searchUpdated(term) }}
style={styles.searchInput}
placeholder="Search"
clearIcon={}
/>

{filteredProducts.map(product => {
return (
<TouchableOpacity onPress={()=>alert(product.name)} key={product.slug} style={styles.productItem}>

{product.name}


)
})}

@osdnk
Copy link

osdnk commented Nov 6, 2018

Hi, @PaddyLock
Let you use

<SearchInput
	onChangeText={this.searchUpdated}
	style={styles.searchInput}
	placeholder="Search"
	value={this.state.value}
	clearIcon={}
/>

Updating state fixes issue for me

@PaddyLock
Copy link
Author

@osdnk Yes that worked to add

value={this.state.value}

Is this a bug as 'value' is undocumented?

@osdnk
Copy link

osdnk commented Dec 19, 2018

Yes. It's a hacky workaround

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants