Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[3932] Do not display the Delete button for non-deletable lists #3939

Merged
merged 1 commit into from
Sep 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ A migration participant has been added to automatically keep compatible all diag
- https://github.com/eclipse-sirius/sirius-web/issues/3902[#3902] [core] Move the Help menu entry at the last position (after any contributed entries)
- https://github.com/eclipse-sirius/sirius-web/issues/3927[#3927] [sirius-web] Make the viewer object configurable
- https://github.com/eclipse-sirius/sirius-web/issues/3928[#3928] [sirius-web] Derive the read-only state from the project GraphQL query
- https://github.com/eclipse-sirius/sirius-web/issues/3932[#3932] [forms] Do not display the 'Delete' button (even disabled) for non-deletable lists

== v2024.7.0

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -248,14 +248,16 @@ export const ListPropertySection: PropertySectionComponent<GQLList> = ({
data-testid={`representation-${item.label}`}>
{item.label}
</Typography>
<IconButton
aria-label="deleteListItem"
onClick={(event) => onDelete(event, item)}
disabled={readOnly || !item.deletable || widget.readOnly}
size="small"
data-testid={`delete-representation-${item.label}`}>
<DeleteIcon />
</IconButton>
{item.deletable && (
<IconButton
aria-label="deleteListItem"
onClick={(event) => onDelete(event, item)}
disabled={readOnly || widget.readOnly}
size="small"
data-testid={`delete-representation-${item.label}`}>
<DeleteIcon />
</IconButton>
)}
</>
);
};
Expand Down