mirror of
https://github.com/strapi/strapi.git
synced 2025-09-26 08:52:26 +00:00
Merge pull request #17428 from strapi/fix/not-call-number-draft-relations-api-with-no-ids
Bulk publish: fix, enable countManyEntriesDraftRelations API only when you have selected entries in the modal
This commit is contained in:
commit
d2a2d80f33
@ -104,6 +104,8 @@ const ConfirmDialogPublishAll = ({ isOpen, onToggleDialog, isConfirmButtonLoadin
|
|||||||
return data;
|
return data;
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
// The API is called everytime you select/deselect an entry, this check avoids us sending a query with bad data
|
||||||
|
enabled: selectedEntries.length > 0,
|
||||||
onError(error) {
|
onError(error) {
|
||||||
toggleNotification({ type: 'warning', message: formatAPIError(error) });
|
toggleNotification({ type: 'warning', message: formatAPIError(error) });
|
||||||
},
|
},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user