mirror of
https://github.com/strapi/strapi.git
synced 2025-09-19 05:23:05 +00:00
Fix: Remove delete button from the list-view instead of disabling it
This commit is contained in:
parent
c3e1892955
commit
cae957a571
@ -342,21 +342,22 @@ export function ReviewWorkflowsListView() {
|
||||
<Pencil />
|
||||
</ActionLink>
|
||||
|
||||
<IconButton
|
||||
aria-label={formatMessage(
|
||||
{
|
||||
id: 'Settings.review-workflows.list.page.list.column.actions.delete.label',
|
||||
defaultMessage: 'Delete {name}',
|
||||
},
|
||||
{ name: 'Default workflow' }
|
||||
)}
|
||||
disabled={workflows.length === 1 || !canDelete}
|
||||
icon={<Trash />}
|
||||
noBorder
|
||||
onClick={() => {
|
||||
handleDeleteWorkflow(workflow.id);
|
||||
}}
|
||||
/>
|
||||
{workflows.length > 1 && canDelete && (
|
||||
<IconButton
|
||||
aria-label={formatMessage(
|
||||
{
|
||||
id: 'Settings.review-workflows.list.page.list.column.actions.delete.label',
|
||||
defaultMessage: 'Delete {name}',
|
||||
},
|
||||
{ name: 'Default workflow' }
|
||||
)}
|
||||
icon={<Trash />}
|
||||
noBorder
|
||||
onClick={() => {
|
||||
handleDeleteWorkflow(workflow.id);
|
||||
}}
|
||||
/>
|
||||
)}
|
||||
</Flex>
|
||||
</Td>
|
||||
</Tr>
|
||||
|
Loading…
x
Reference in New Issue
Block a user