-
Notifications
You must be signed in to change notification settings - Fork 7
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
tonic-input without id causes value to be lost #31
Comments
This is by design, but I'm not sure the developer experience is correct. Basically, |
Hmm, emphemereal=true might be a good option. I think not persisting the state can lead to bad UX. Is there a use case for not setting id on tonic-input ? Cleaning the end users text upon reRender is a bad experience. |
My suggested solution would be to add a check for props.id in the render method of tonic-input and throw an exception if it’s missing |
Some inputs are optional, their values don't need to be remembered, but that might be the unimportant case. So we are saying we should just remember a component's state by default. I think that's pretty reasonable actually. |
This is not possible to implement. We can either :
|
If a
tonic-input
does not have anid
attribute then when you type in it and re-render the component the text that was typed is lost.You need to add an
id
attribute totonic-input
The text was updated successfully, but these errors were encountered: