Skip to content

Forms: better Feathers support, edit form data

Latest

Choose a tag to compare

@marshallswain marshallswain released this 06 Jan 04:25
· 44 commits to master since this release

Better Feathers Auth Support

You can now set a strategy attribute on a form to have it add a strategy attribute to the outgoing data. This happens before the processData(data) function.

import LoginForm from 'auth-component/forms/login/';

<LoginForm strategy='local' />

Edit data before it's sent.

It's now possible to use the processData(data) function to edit the form data before it gets sent to the server:

import LoginForm from 'auth-component/forms/login/';

function processData (data) {
  data.customAttribute = 'hello';
  return data;
}

<LoginForm processData={processData} />