-
Notifications
You must be signed in to change notification settings - Fork 326
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
call clean() outside Geosuggest section #54
Comments
I'm no React expert, but I'm using var App = React.createClass({
render: function() {
return (
<div>
<Geosuggest
ref="geosuggest" />
</div>
);
}
clearSearch: function() {
this.refs.geosuggest.clear();
}
}); |
I suppose it is working, reopen if not! |
I have same issue. I want to clear the input when I render the component. How can I do that? |
Do you want to clear it on the first render? Then just provide an empty You can call the clear like @Driklyn described above. |
initialValue is not what I need. I neetd to clear it outside the component like, in its parent render. or by clicking a button. When I try @Driklyn code I get this: |
I cannot say what the problem is without any code. However, this is not related to the component, it’s general React. |
When adding this method to geosuggest (just quick and dirty test). We are able to get the current This is a good thing as we do not want to have an
One solution would be that we have an exposed method to trigger geocodeSuggest return the response. |
I am not sure but how can I call clear() on Focus when I use ES6 syntax? |
I have a button to clean form input value include geosuggest.
How to call clean() outside geosuggest section?
The text was updated successfully, but these errors were encountered: