You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey @alex-cory, thanks for creating this excellent library! One small issue while using this library: there doesn't seem to be an easy way to reset the state or the input, since the only way for change is an onChange that requires an event passed in.
Any ideas on how that might be achieved?
The text was updated successfully, but these errors were encountered:
constApp=()=>{const{ email, bind }=useEmailAutocomplete()constrerender=useReducer(()=>({}),[])[1]constonSubmit=()=>{// your logicemail.address=''// will reset it, but will not trigger a rerender// depending if you are updating state after this for anything,// you might not need this rerender(). I know it's a little hacky, but it should workrerender()}return<input{...bind}/>}
I don't think it would be too difficult to add a function like. I just think it might confuse people if it's not well documented.
constApp=()=>{const{ email, setEmail, bind }=useEmailAutocomplete()constonSubmit=()=>{// your logicsetEmail('')// this does not exist}return<input{...bind}/>}
Hey @alex-cory, thanks for creating this excellent library! One small issue while using this library: there doesn't seem to be an easy way to reset the state or the input, since the only way for change is an
onChange
that requires an event passed in.Any ideas on how that might be achieved?
The text was updated successfully, but these errors were encountered: