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

Deplay in onChange event #180

Closed
quanle1994 opened this issue Jan 11, 2020 · 4 comments
Closed

Deplay in onChange event #180

quanle1994 opened this issue Jan 11, 2020 · 4 comments

Comments

@quanle1994
Copy link

Hello

Thank you for this great component. I have just a small request on the delay time of the onChange callback.

Could you provide an option to get the onChange contents immediately after typing? I am doing empty message validation so getting this value without delay will make the error display promptly.

Regards

@JiHong88
Copy link
Owner

Hi, @quanle1994

Yes, I can add options for delay time.
But, the change event will not call while the key is held down.
Is it enough to adjust the delay only?

Regards

@quanle1994
Copy link
Author

Hi @JiHong88

My ultimate goal is to capture all the changes immediately when the text value is changed so it's best if the callback is called on every character change even when a key is held down. For now, I just need to validate for empty messages so maybe just a callback when the text is empty will do. However, this is too specific to my use case so it may not benefit others.

Regarding the pressing and holding of a key, I think the onChange will not be called after the key is up in Chrome and Firefox. I have commented in #173 too. This seems to be a more critical request so if you could help me fix it, I can use it to validate the empty messages and hence I wouldn't need the reduction in onChange delay as much then.

@JiHong88
Copy link
Owner

OK, I see.
That issue has been fixed.
I'll let you know after the version update soon.
Thank you.

@JiHong88
Copy link
Owner

Hi, @quanle1994

Fixed in v2.24.0

Thank you.

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

2 participants