Skip to content

Commit

Permalink
[3645] Revert earlier change in selection propagation which caused re…
Browse files Browse the repository at this point in the history
…gressions

Bug: #3645
Signed-off-by: Pierre-Charles David <[email protected]>
  • Loading branch information
pcdavid authored and sbegaudeau committed Jun 20, 2024
1 parent 486c28b commit 6de3a1a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 15 deletions.
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

0 comments on commit 6de3a1a

Please sign in to comment.