diff --git a/docs/CreateEdit.md b/docs/CreateEdit.md index 2eaae11e2fc..847988a6a45 100644 --- a/docs/CreateEdit.md +++ b/docs/CreateEdit.md @@ -883,6 +883,27 @@ Here are the props received by the `Toolbar` component when passed as the `toolb **Tip**: To alter the form values before submitting, you should use the `handleSubmit` prop. See [Altering the Form Values before Submitting](#altering-the-form-values-before-submitting) for more information and examples. +**Tip**: If you want to include a `` in the ``, the props injected by `` to its children (`handleSubmit`, `handleSubmitWithRedirect`, `onSave`, `invalid`, `pristine`, `saving`, and `submitOnEnter`) will cause React warnings. You'll need to wrap `` in another component and ignore the injected props, as follows: + +```jsx +const ToolbarCreateButton = ({ + handleSubmit, + handleSubmitWithRedirect, + onSave, + invalid, + pristine, + saving, + submitOnEnter, + ...rest +}) => ; + +const PostEditToolbar = props => ( + + + +); +``` + ## Customizing The Form Layout You can customize each row in a `` or in a `` by passing props to the Input components: