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

[4455] Keep reference values navigable even when in read-only mode #4456

Merged
merged 1 commit into from
Jan 27, 2025
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
2 changes: 1 addition & 1 deletion CHANGELOG.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ These components could be reused by downstream applications in custom creation t
- https://github.com/eclipse-sirius/sirius-web/issues/4333[#4333] [diagram] Improve the style of the palette by switching the positions of the search field and the quick access tools and by adding a small touch of grey in the header bar and search field
- https://github.com/eclipse-sirius/sirius-web/issues/4286[#4286] [sirius-web] Make default explorer drag and drop work only for the default explorer.
Downstream applications with a custom explorer that relies on `ExplorerDropTreeItemHandler` now need to provide their own `IDropTreeItemHandler` to support drag and drop in their explorer.

- https://github.com/eclipse-sirius/sirius-web/issues/4455[#4455] [forms] Even when in read-only mode, the values displayed in a _Reference_ widgets are now clickable so that the user can navigate to the reference's values.

== v2024.11.0

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ export const ValuedReferenceAutocomplete = ({
disableClearable
renderTags={(value, getTagProps) =>
value.map((option, index) => {
const { key, ...tagProps } = getTagProps({ index });
const { key, onDelete, ...tagProps } = getTagProps({ index });
return (
<Chip
key={key}
Expand All @@ -257,9 +257,11 @@ export const ValuedReferenceAutocomplete = ({
<IconOverlay iconURL={option.iconURL} alt={option.kind} />
</div>
}
clickable={!readOnly && !widget.readOnly}
clickable
onClick={() => optionClickHandler(option)}
{...tagProps}
disabled={false}
onDelete={readOnly || widget.readOnly ? undefined : onDelete}
/>
);
})
Expand Down
Loading