Skip to content

Commit e7b4a78

Browse files
authored
Avoid some rerender of the variable editor in the side panel (#9004)
Don't show in changelog
1 parent 086b2d3 commit e7b4a78

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

newIDE/app/src/VariablesList/VariablesList.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2126,7 +2126,13 @@ const VariablesList: React.ComponentType<{
21262126
>
21272127
<I18n>
21282128
{({ i18n }) => (
2129-
<ClickAwayListener onClickAway={() => setSelectedNodes([])}>
2129+
<ClickAwayListener
2130+
onClickAway={() =>
2131+
setSelectedNodes(selectedNodes =>
2132+
selectedNodes.length === 0 ? selectedNodes : []
2133+
)
2134+
}
2135+
>
21302136
<Measure
21312137
bounds
21322138
onResize={contentRect => {

0 commit comments

Comments
 (0)