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

[3645] Revert earlier change in selection propagation which caused regressions #3646

Merged
merged 1 commit into from
Jun 20, 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 @@ -110,6 +110,7 @@ image:doc/screenshots/insideLabelPositions.png[Inside label positions, 70%]
- https://github.com/eclipse-sirius/sirius-web/issues/3653[#3653] [gantt] Add documentation for gantt representation
- https://github.com/eclipse-sirius/sirius-web/issues/3634[#3634] [sirius-web] Simplifying the contribution to the GraphQL subscription of the diagram for custom nodes
- https://github.com/eclipse-sirius/sirius-web/issues/3656[#3656] [core] Add the ability to customize the GraphQL type resolver
- https://github.com/eclipse-sirius/sirius-web/issues/3645[#3645] [core] Revert earlier change made in #3595 which caused regressions


== v2024.5.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,21 +32,7 @@ export const SelectionContextProvider = ({ initialSelection, children }: Selecti
});

const setSelection = useCallback((selection: Selection) => {
setState((prevState) => {
const prevSelectionKey = prevState.selection.entries
.map((entry) => entry.id)
.sort()
.join(':');
const newSelectionKey = selection.entries
.map((entry) => entry.id)
.sort()
.join(':');
if (prevSelectionKey !== newSelectionKey) {
return { ...prevState, selection };
} else {
return prevState;
}
});
setState((prevState) => ({ ...prevState, selection }));
}, []);

return (
Expand Down
Loading