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

Feature Request: Method to ClearAll immediately. #205

Open
wparad opened this issue Sep 20, 2023 · 7 comments
Open

Feature Request: Method to ClearAll immediately. #205

wparad opened this issue Sep 20, 2023 · 7 comments

Comments

@wparad
Copy link

wparad commented Sep 20, 2023

Instead of deleting all the typed characters, DeleteAll just starts deleting the characters one by one. How do I delete all the typed characters in one single moment?

One would expect the DeleteAll command to do this but it doesn't. However from the discussion below, it seems this "confusing behavior" is intended and won't be fixed. So instead can I recommend a new command "ClearAll" that performs action.

@kenshanta
Copy link

Have you considered using the changeDeleteSpeed() prop?
It wouldn't make sense for all characters to disappear in one go as it defeats the purpose of a typewriter effect, would it?

@wparad wparad changed the title DeleteAll doesn't DeleteAll Clear all: DeleteAll doesn't DeleteAll Jan 3, 2024
@wparad
Copy link
Author

wparad commented Jan 3, 2024

I think so, and 0 wasn't fast enough.

It wouldn't make sense for all characters to disappear in one go as it defeats the purpose of a typewriter effect, would it?

That's just a weird thing to say. Forward is great, backward is terrible. If you are only going to delete some characters, then it makes sense to show what you are deleting, but if you want to clear everything, there is just no way to do that. Even if changeDeleteSpeed worked, basically that would be a huge hack that would require a bunch of changes to make the right thing happen.

The use case, clearAll, it would seem that is exactly the purpose of deleteAll from a user perspective, but if the library wants to use those words to mean something else that's fine.

If we want to stand on principle rather than usefulness, then feel free to call a new method: throwPageAway(), that would work fine for me.

@kenshanta
Copy link

the value of 0 throws back to the natural deleting speed.
try 1

@wparad
Copy link
Author

wparad commented Jan 3, 2024

too-slow

I don't think we are on the same page here, I'm looking for instant delete everything and start over. This is deleteAll(1), this is not the same as clear().

@kenshanta
Copy link

kenshanta commented Jan 11, 2024

I understood your requirement clearly. however the issue should be under a different title.
maybe a proposal to include clearAll feature of it already exists to fix it

i Suggest you close/edit this issue and provide a better brief about what is it that you want

@wparad wparad changed the title Clear all: DeleteAll doesn't DeleteAll Feature Request: Method to ClearAll immediately. Jan 11, 2024
@wparad
Copy link
Author

wparad commented Jan 11, 2024

All the details are in this thread, I'm not sure why I would close this issue. That doesn't make any sense.

@marshall-li
Copy link

Same question. I use recursive function in the callFunction to achieve this.
image
You can try this if you need.

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

3 participants