Description
According to the documentation
https://marmelab.com/react-admin/SaveButton.html#transform
a SaveButton with the default type "submit" should be able to use a transform callback to transform the data before sending it.
<SaveButton transform={transformUser} />
In reality trying to use this property only result on a warning and no data transformation, which is confirmed by the the source code
warning( type === 'submit' && ((mutationOptions && (mutationOptions.onSuccess || mutationOptions.onError)) || transform), 'Cannot use <SaveButton mutationOptions> props on a button of type "submit". To override the default mutation options on a particular save button, set the <SaveButton type="button"> prop, or set mutationOptions in the main view component (<Create> or <Edit>).' );
I think either the code or the documentation should be updated
Activity