fix(content-manager): dont perform unnecessary requests

This commit is contained in:
Fernando Chavez 2024-08-07 10:30:08 +02:00
parent a7ba501bdf
commit 14afa09a9f

View File

@ -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) => {