Skip to content

Conversation

@the-overengineer
Copy link

Adds the ability to specify the endpoint on the Form components as a property, as well as on the LoginRoute and LoginLink. Essentially, all components that would call a config-defined endpoint will instead call the given endpoint. If no endpoint is provided, the behaviour remains the same.

Additionally, adds a third optional headers parameter for all Form components that have support for the onSubmit function. This parameter is an object that can be used to manually set some headers before calling the API/back-end intergration. Something like this was asked about in #151.

Fixes #120

Where we call the login action when a user can auto-login
@robertjd
Copy link
Member

robertjd commented Feb 1, 2017

Thanks @Tweety-FER ! I found one more action call that needed to be updated, please see the commit I added.

Are these changes a breaking change? I'm asking because I see that the actions are exported from this module, and they have a new arity.

Also: do we need to be updating the documentation in docs/ ?

@the-overengineer
Copy link
Author

Thanks for the fix @robertjd!

You're right about the action dispatchers, I forgot that they were public. Added an arity check, so that they can now be used with any combination of (callback), (options, callback), (options, settings, callback). Should not longer be a breaking change now.

Also added a brief note about the endpoint params for the forms in the docs.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants