File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
apps/sim/app/workspace/[workspaceId]/w/[workflowId] Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -2165,8 +2165,11 @@ const WorkflowContent = React.memo(() => {
21652165 } )
21662166 const selectedIds = selectedIdsRef . current as string [ ] | null
21672167 if ( selectedIds !== null ) {
2168- const { currentBlockId, clearCurrentBlock } = usePanelEditorStore . getState ( )
2169- if ( currentBlockId && selectedIds . indexOf ( currentBlockId ) === - 1 ) {
2168+ const { currentBlockId, clearCurrentBlock, setCurrentBlockId } =
2169+ usePanelEditorStore . getState ( )
2170+ if ( selectedIds . length === 1 && selectedIds [ 0 ] !== currentBlockId ) {
2171+ setCurrentBlockId ( selectedIds [ 0 ] )
2172+ } else if ( selectedIds . length === 0 && currentBlockId ) {
21702173 clearCurrentBlock ( )
21712174 }
21722175 }
You can’t perform that action at this time.
0 commit comments