mirror of
https://github.com/strapi/strapi.git
synced 2025-07-22 08:26:44 +00:00
fix(content-manager): dont perform unnecessary requests
This commit is contained in:
parent
a7ba501bdf
commit
14afa09a9f
@ -52,9 +52,10 @@ const TableActions = ({ document }: TableActionsProps) => {
|
|||||||
return (
|
return (
|
||||||
<DescriptionComponentRenderer
|
<DescriptionComponentRenderer
|
||||||
props={props}
|
props={props}
|
||||||
descriptions={(
|
descriptions={(plugins['content-manager'].apis as ContentManagerPlugin['config']['apis'])
|
||||||
plugins['content-manager'].apis as ContentManagerPlugin['config']['apis']
|
.getDocumentActions()
|
||||||
).getDocumentActions()}
|
// We explicitly remove the PublishAction from description so we never render it and we don't make unnecessary requests.
|
||||||
|
.filter((action) => action.name !== 'PublishAction')}
|
||||||
>
|
>
|
||||||
{(actions) => {
|
{(actions) => {
|
||||||
const tableRowActions = actions.filter((action) => {
|
const tableRowActions = actions.filter((action) => {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user