react-admin: unSelectAll not working

Related code:

onSuccess: {
            notification: {
                body: 'Republishing versions to existing saved spaces',
                level: 'info',
                messageArgs: {
                    smart_count: ids.length,
                },
            },
            basePath,
            refresh:true,
            redirectTo: "/versions",
            unselectAll:true,
        },

I have the above code unSelectAll is not working.The selected items are still selected

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 19 (6 by maintainers)

Most upvoted comments

This has been driving me crazy for months, so thought I’d spend a bit of time running through it today.

The issue occurs when you pass in a resource with an extra path. For example, if you have:

<Resource name='myawesomeresource' />

These work: crudUpdateMany(resource, selectedIds, { status: 'accepted' }, basePath) or crudUpdateMany('myawesomeresource', selectedIds, { status: 'accepted' }, basePath)

However this doesn’t: crudUpdateMany('myawesomeresource/with/a/path', selectedIds, { status: 'accepted' }, basePath)

I’ve not started looking at the underlying code in crudUpdateMany yet, but wanted to share this ASAP.

@anuraram12345 - looks like you’re trying to do what I am.