-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Callback return value in custom event handlers #1553
Comments
It seems totally reasonable, I can't think of a reason not to do that off the top of my head. Any chance you could throw a PR together? It may not even need an additional test if it's already covered by the ones in |
@Rich-Harris Yes, I could provide a PR for that fix, but I didn't catch the meaning of the phrase "throw a PR together". Sorry about that, I'm not a native speaker, as you can see.))) |
@Rich-Harris Check related PR, please! |
Closed with #1557 |
…ustom-event-handler Revert "Fix for #1553"
For example, I want to write some custom event handler for form submission which will be additionally disable form fields to prevent modifying. So, I'll do something like this:
And use it as follows:
It's very useful and I'll just use this custom event in all my forms which need this feature.
The problem, that right now
callback
handler looks like this:So, I can't get a value returned by component's method.
I suppose, we could just add
return
statement to this generated code to get something like this:What do you think about it?
The text was updated successfully, but these errors were encountered: