@@ -198,24 +198,24 @@ const QuickSearch = () => {
198198
199199 entities = ! isEmpty ( searchResults ?. entities )
200200 ? searchResults ?. entities ?. map ( ( entityDef : any ) => {
201- const { name } : { name : string ; found : boolean ; key : any } =
202- extractKeyValueFromEntity ( entityDef ) ;
203- return {
204- title : `${ name } ` ,
205- parent : entityDef . typeName ,
206- types : "Entities" ,
207- entityObj : entityDef
208- } ;
209- } )
201+ const { name } : { name : string ; found : boolean ; key : any } =
202+ extractKeyValueFromEntity ( entityDef ) ;
203+ return {
204+ title : `${ name } ` ,
205+ parent : entityDef . typeName ,
206+ types : "Entities" ,
207+ entityObj : entityDef
208+ } ;
209+ } )
210210 : [ { title : "No Entities Found" , types : "Entities" } ] ;
211211
212212 suggestionNames = ! isEmpty ( suggestions )
213213 ? suggestions . map ( ( suggestion : any ) => {
214- return {
215- title : `${ suggestion } ` ,
216- types : "Suggestions"
217- } ;
218- } )
214+ return {
215+ title : `${ suggestion } ` ,
216+ types : "Suggestions"
217+ } ;
218+ } )
219219 : [ { title : "No Suggestions Found" , types : "Suggestions" } ] ;
220220
221221 setOptions ( [ ...entities , ...suggestionNames ] as GlobalOptionRow [ ] ) ;
@@ -388,7 +388,6 @@ const QuickSearch = () => {
388388 className = "global-search-stack"
389389 alignItems = "center"
390390 gap = "0.5rem"
391- sx = { { minWidth : 0 , flexShrink : 1 } }
392391 >
393392 < FormControl
394393 size = "small"
@@ -437,8 +436,8 @@ const QuickSearch = () => {
437436 disablePortal
438437 className = "global-search-autocomplete"
439438 sx = { {
440- minWidth : 150 ,
441- flex : "1 1 280px" ,
439+ minWidth : 280 ,
440+ flex : 1 ,
442441 "& + .MuiAutocomplete-popper .MuiAutocomplete-option" : {
443442 backgroundColor : "white"
444443 } ,
@@ -494,14 +493,14 @@ const QuickSearch = () => {
494493
495494 const { entityObj, types, parent } =
496495 typeof option !== "string" &&
497- "entityObj" in option &&
498- "types" in option &&
499- "parent" in option
496+ "entityObj" in option &&
497+ "types" in option &&
498+ "parent" in option
500499 ? ( option as {
501- entityObj : { status ?: string ; guid ?: string } ;
502- types : string ;
503- parent : string ;
504- } )
500+ entityObj : { status ?: string ; guid ?: string } ;
501+ types : string ;
502+ parent : string ;
503+ } )
505504 : { entityObj : null , types : "" , parent : "" } ;
506505 const title =
507506 typeof option !== "string" && "title" in option
@@ -557,7 +556,7 @@ const QuickSearch = () => {
557556 to = { { pathname : href } }
558557 color = {
559558 entityObj ?. status &&
560- entityStateReadOnly [ entityObj . status ]
559+ entityStateReadOnly [ entityObj . status ]
561560 ? "error"
562561 : "primary"
563562 }
@@ -567,48 +566,48 @@ const QuickSearch = () => {
567566 ) }
568567 { types === "Entities" && ! isEmpty ( entityObj )
569568 ? parts . map ( ( part , index ) => (
570- < Stack
571- flexDirection = "row"
572- key = { index }
573- style = { {
574- fontWeight : part . highlight ? "bold" : "regular"
575- } }
576- >
577- { entityObj ?. guid !== "-1" && ! part . highlight ? (
578- < Link
579- className = "entity-name text-blue text-decoration-none"
580- style = { {
581- color : "black" ,
582- textDecoration : "none" ,
583- maxWidth : "100%" ,
584- width : "100%"
585- } }
586- to = { { pathname : href } }
587- color = {
588- entityObj ?. status &&
569+ < Stack
570+ flexDirection = "row"
571+ key = { index }
572+ style = { {
573+ fontWeight : part . highlight ? "bold" : "regular"
574+ } }
575+ >
576+ { entityObj ?. guid !== "-1" && ! part . highlight ? (
577+ < Link
578+ className = "entity-name text-blue text-decoration-none"
579+ style = { {
580+ color : "black" ,
581+ textDecoration : "none" ,
582+ maxWidth : "100%" ,
583+ width : "100%"
584+ } }
585+ to = { { pathname : href } }
586+ color = {
587+ entityObj ?. status &&
589588 entityStateReadOnly [ entityObj . status ]
590- ? "error"
591- : "primary"
592- }
593- >
594- { part . text }
595- </ Link >
596- ) : (
597- part . text
598- ) }
599- </ Stack >
600- ) )
589+ ? "error"
590+ : "primary"
591+ }
592+ >
593+ { part . text }
594+ </ Link >
595+ ) : (
596+ part . text
597+ ) }
598+ </ Stack >
599+ ) )
601600 : parts . map ( ( part , index ) => (
602- < Stack
603- flexDirection = "row"
604- key = { index }
605- style = { {
606- fontWeight : part . highlight ? "bold" : "regular"
607- } }
608- >
609- { part . text }
610- </ Stack >
611- ) ) }
601+ < Stack
602+ flexDirection = "row"
603+ key = { index }
604+ style = { {
605+ fontWeight : part . highlight ? "bold" : "regular"
606+ } }
607+ >
608+ { part . text }
609+ </ Stack >
610+ ) ) }
612611 { types === "Entities" &&
613612 ! isEmpty ( entityObj ) &&
614613 ` (${ parent } )` }
0 commit comments