@@ -208,7 +208,7 @@ import { Input } from "./ui/input";
208208import {
209209 Combobox ,
210210 ComboboxEmpty ,
211- ComboboxInput ,
211+ ComboboxSearchInput ,
212212 ComboboxItem ,
213213 ComboboxList ,
214214 ComboboxPopup ,
@@ -4395,48 +4395,34 @@ export default function Sidebar() {
43954395 align = "start"
43964396 className = "w-(--anchor-width) min-w-0 overflow-hidden"
43974397 >
4398- < div className = "shrink-0 px-3 pt-2.5" >
4399- < div className = "relative -translate-y-px border-b border-border/70 pb-1.5 transition-colors focus-within:border-ring" >
4400- < SearchIcon
4401- aria-hidden = "true"
4402- className = "pointer-events-none absolute top-1.5 left-0 size-4 shrink-0 text-muted-foreground/55"
4403- />
4404- < ComboboxInput
4405- aria-label = "Search projects"
4406- className = "[&_input]:h-6.5 [&_input]:ps-5 [&_input]:font-sans [&_input]:leading-6.5"
4407- inputClassName = "rounded-none bg-transparent text-sm"
4408- placeholder = "Search projects..."
4409- showTrigger = { false }
4410- size = "sm"
4411- unstyled
4412- value = { projectScopeMenuState . query }
4413- onKeyDown = { ( event ) => {
4414- if (
4415- event . defaultPrevented ||
4416- event . nativeEvent . isComposing ||
4417- event . ctrlKey ||
4418- event . altKey ||
4419- event . metaKey ||
4420- ( event . key !== "ContextMenu" &&
4421- ! ( event . shiftKey && event . key === "F10" ) )
4422- ) {
4423- return ;
4424- }
4425- // Combobox items use virtual focus: keyboard events
4426- // stay on this input, not on the highlighted option.
4427- const scopeKey = highlightedProjectScopeKeyRef . current ;
4428- const project = scopeKey ? projectGroupByScopeKey . get ( scopeKey ) : null ;
4429- if ( project ) handleProjectSettings ( event , project ) ;
4430- } }
4431- onChange = { ( event ) =>
4432- dispatchProjectScopeMenu ( {
4433- type : "query-changed" ,
4434- query : event . target . value ,
4435- } )
4436- }
4437- />
4438- </ div >
4439- </ div >
4398+ < ComboboxSearchInput
4399+ aria-label = "Search projects"
4400+ placeholder = "Search projects..."
4401+ value = { projectScopeMenuState . query }
4402+ onKeyDown = { ( event ) => {
4403+ if (
4404+ event . defaultPrevented ||
4405+ event . nativeEvent . isComposing ||
4406+ event . ctrlKey ||
4407+ event . altKey ||
4408+ event . metaKey ||
4409+ ( event . key !== "ContextMenu" && ! ( event . shiftKey && event . key === "F10" ) )
4410+ ) {
4411+ return ;
4412+ }
4413+ // Combobox items use virtual focus: keyboard events
4414+ // stay on this input, not on the highlighted option.
4415+ const scopeKey = highlightedProjectScopeKeyRef . current ;
4416+ const project = scopeKey ? projectGroupByScopeKey . get ( scopeKey ) : null ;
4417+ if ( project ) handleProjectSettings ( event , project ) ;
4418+ } }
4419+ onChange = { ( event ) =>
4420+ dispatchProjectScopeMenu ( {
4421+ type : "query-changed" ,
4422+ query : event . target . value ,
4423+ } )
4424+ }
4425+ />
44404426 < ComboboxEmpty > No matching projects.</ ComboboxEmpty >
44414427 < ComboboxList >
44424428 { ( item : ( typeof projectScopeItems ) [ number ] ) => {
0 commit comments