@@ -188,7 +188,7 @@ const BuilderPage = () => {
188188
189189 useEffect ( ( ) => {
190190 if (
191- memorizedSelectedStep &&
191+ ! memorizedSelectedStep ||
192192 memorizedSelectedStep . type === TriggerType . EMPTY
193193 ) {
194194 setRightSidebar ( RightSideBarType . NONE ) ;
@@ -199,6 +199,12 @@ const BuilderPage = () => {
199199
200200 const { setPanelGroupSize } = useResizablePanelGroup ( ) ;
201201
202+ const isRightSidebarVisible =
203+ rightSidebar === RightSideBarType . BLOCK_SETTINGS &&
204+ ! ! memorizedSelectedStep &&
205+ memorizedSelectedStep . type !== TriggerType . EMPTY &&
206+ ! isBlockLoading ;
207+
202208 return (
203209 < div className = "flex h-screen w-screen flex-col relative" >
204210 { run && (
@@ -272,8 +278,8 @@ const BuilderPage = () => {
272278
273279 < >
274280 < ResizableHandle
275- disabled = { rightSidebar === RightSideBarType . NONE }
276- withHandle = { rightSidebar !== RightSideBarType . NONE }
281+ disabled = { ! isRightSidebarVisible }
282+ withHandle = { isRightSidebarVisible }
277283 onDragging = { setIsDraggingHandle }
278284 className = "z-50 w-0"
279285 />
@@ -286,23 +292,20 @@ const BuilderPage = () => {
286292 maxSize = { 60 }
287293 order = { 3 }
288294 className = { cn ( 'min-w-0 bg-background z-30' , {
289- [ minWidthOfSidebar ] : rightSidebar !== RightSideBarType . NONE ,
295+ [ minWidthOfSidebar ] : isRightSidebarVisible ,
290296 } ) }
291297 >
292- { rightSidebar === RightSideBarType . BLOCK_SETTINGS &&
293- memorizedSelectedStep &&
294- memorizedSelectedStep . type !== TriggerType . EMPTY &&
295- ! isBlockLoading && (
296- < StepSettingsProvider
297- blockModel = { blockModel }
298- selectedStep = { memorizedSelectedStep }
299- key = { containerKey }
300- >
301- < DynamicFormValidationProvider >
302- < StepSettingsContainer />
303- </ DynamicFormValidationProvider >
304- </ StepSettingsProvider >
305- ) }
298+ { isRightSidebarVisible && (
299+ < StepSettingsProvider
300+ blockModel = { blockModel }
301+ selectedStep = { memorizedSelectedStep }
302+ key = { containerKey }
303+ >
304+ < DynamicFormValidationProvider >
305+ < StepSettingsContainer />
306+ </ DynamicFormValidationProvider >
307+ </ StepSettingsProvider >
308+ ) }
306309 </ ResizablePanel >
307310 </ >
308311 </ ResizablePanelGroup >
0 commit comments