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

Texts are not getting erased #28

Closed
hiteshsahu opened this issue Oct 25, 2018 · 4 comments
Closed

Texts are not getting erased #28

hiteshsahu opened this issue Oct 25, 2018 · 4 comments

Comments

@hiteshsahu
Copy link

See here

https://codesandbox.io/s/k54yp599oo

@titchimoto
Copy link

Agreed. Any updates on this? Love the library but this is preventing me from using it in a project.

@notadamking
Copy link
Owner

Okay, this makes sense. When I originally created the library, I hadn't considered using the <Reset /> component without setting the loop prop on the parent Typing component. However, it is a valid use case.

It's been a while since I really dived into this codebase, but iirc, the problem is most likely coming from the fact that we render all of the children of the parent Typing component after the entire animation is complete, if the loop prop is false.

To fix this, we should instead render the currently typed text at the end of the animation, as this should be set to [] after a Reset.

@yungobiwan
Copy link

@adamjking3 how do you prevent the text from showing after typing is complete. After some text is backspaced, it show at the end of typing. What is the correct way to prevent this?

@notadamking
Copy link
Owner

Thanks to @dallin-christensen for submitting a PR that fixes this bug!

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

No branches or pull requests

4 participants