From 4334430727b1c769623bc6fe76b2dfb1c6c118b1 Mon Sep 17 00:00:00 2001 From: fzaninotto Date: Fri, 19 Apr 2019 11:53:09 +0200 Subject: [PATCH] Fix Mutation documentation showing wrong notification side effect syntax Refs #3125 --- docs/Actions.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/Actions.md b/docs/Actions.md index c98e38746ab..19843754e3a 100644 --- a/docs/Actions.md +++ b/docs/Actions.md @@ -259,7 +259,7 @@ class ApproveButton extends Component { - } + dataProvider(UPDATE, 'comments', { id: record.id, data: updatedRecord }, { + onSuccess: { -+ notification: 'Comment approved', ++ notification: { body: 'Comment approved', level: 'info' }, + redirectTo: '/comments', + }, + onError: { @@ -309,7 +309,7 @@ class ApproveButton extends Component { dataProvider(UPDATE, 'comments', { id: record.id, data: updatedRecord }, { + undoable: true, onSuccess: { - notification: 'Comment approved', + notification: { body: 'Comment approved', level: 'info' }, redirectTo: '/comments', }, onError: { @@ -387,7 +387,7 @@ import { Mutation } from 'react-admin'; const options = { undoable: true, onSuccess: { - notification: 'Comment approved', + notification: { body: 'Comment approved', level: 'info' }, redirectTo: '/comments', }, onError: {