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,6 +342,7 @@ export function ReviewWorkflowsListView() {
|
|||||||
<Pencil />
|
<Pencil />
|
||||||
</ActionLink>
|
</ActionLink>
|
||||||
|
|
||||||
|
{workflows.length > 1 && canDelete && (
|
||||||
<IconButton
|
<IconButton
|
||||||
aria-label={formatMessage(
|
aria-label={formatMessage(
|
||||||
{
|
{
|
||||||
@ -350,13 +351,13 @@ export function ReviewWorkflowsListView() {
|
|||||||
},
|
},
|
||||||
{ name: 'Default workflow' }
|
{ name: 'Default workflow' }
|
||||||
)}
|
)}
|
||||||
disabled={workflows.length === 1 || !canDelete}
|
|
||||||
icon={<Trash />}
|
icon={<Trash />}
|
||||||
noBorder
|
noBorder
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
handleDeleteWorkflow(workflow.id);
|
handleDeleteWorkflow(workflow.id);
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
|
)}
|
||||||
</Flex>
|
</Flex>
|
||||||
</Td>
|
</Td>
|
||||||
</Tr>
|
</Tr>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user