-
-
Notifications
You must be signed in to change notification settings - Fork 56
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: Pass options to use:enhance #37
Comments
There is a The events I'm not sure what you mean exactly, you want to be able to add events after calling |
You are able to use enhance like
Currently with super form you have to pass those options into the |
Ah, good idea, will definitely implement that in a near release. Many of the options should be usable there. Any other options except the events that you may find interesting to use there? |
Removed the |
I would think they would overwrite the options passed in the |
I'm thinking about what would happen if the action is used in several places. Is that what you had in mind, btw? :) If so, I think event chaining would be the best option, it's too easy to cause surprises when calling it in several unrelated places, otherwise. |
Yes multiple places is how I was/am using it. Chaining sounds good to me |
I think that will work fine, I'll start preparing that for the next release! |
@ElijahJohnson5 you should be able to pass events in <form method="POST" use:enhance={{onUpdated: ({form}) => ... }}> Can you check that it works? |
Yes it works great! Thank you |
Nice, closing this then. :) |
Hello,
Really enjoying using the library. I am having some trouble where I want to be able to create the form at the top level and pass it down to components that handle using it. However these components want to set the options like
onUpdate
oronResult
so I just have to pass the validation down to the component and create the form there.If there is a better way to handle this that I am missing let me know. It is also hard to pass the form/validation all the way down to where the form actually is in my components since it may be deep in a component.
The text was updated successfully, but these errors were encountered: