Skip to content

Commit d2cebb5

Browse files
committed
fix(toolbar): restore search icon on blur when input is empty
1 parent e5c9509 commit d2cebb5

File tree

1 file changed

+5
-2
lines changed
  • apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/toolbar

1 file changed

+5
-2
lines changed

apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/toolbar/toolbar.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -305,12 +305,15 @@ export const Toolbar = forwardRef<ToolbarRef, ToolbarProps>(function Toolbar(
305305
/**
306306
* Handle search input blur.
307307
*
308-
* We intentionally keep search mode active after blur so that ArrowUp/Down
308+
* Deactivates search mode when the input is empty, restoring the search icon.
309+
* When there is search text, we keep search mode active so that ArrowUp/Down
309310
* navigation continues to work after the first move from the search input
310311
* into the triggers/blocks list (e.g. when initiated via Mod+F).
311312
*/
312313
const handleSearchBlur = () => {
313-
// No-op by design
314+
if (!searchQuery.trim()) {
315+
setIsSearchActive(false)
316+
}
314317
}
315318

316319
/**

0 commit comments

Comments
 (0)