Skip to content

Commit

Permalink
ENG-5315 manage visibility of delete button on WidgetListTable
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanjpburgos authored and ryanjpburgos committed Jan 8, 2024
1 parent 7003560 commit 2115568
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/ui/widgets/list/WidgetListTable.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ export const WidgetListTableBody = ({
className: 'text-center',
},
Cell: (cellinfo) => {
const { values: { code }, original: { locked, hasConfig } } = cellinfo;
const { values: { code }, original: { locked, hasConfig, used } } = cellinfo;
return (
<div data-testid={`${code}-actions`}>
<DropdownKebab pullRight id={`WidgetListRow-dropdown-${code}`}>
Expand All @@ -95,7 +95,7 @@ export const WidgetListTableBody = ({
>
<FormattedMessage id="app.edit" />
</MenuItem>
{!locked && (
{!locked && used === 0 && (
<MenuItem
className="WidgetListRow__menu-item-delete"
onClick={() => onDelete(code)}
Expand Down

0 comments on commit 2115568

Please sign in to comment.