@@ -29,6 +29,7 @@ import { ConnectionTitle, ProfileBuilderTitle } from "../../pages/[workspaceId]/
29
29
import { StreamTitle } from "../../pages/[workspaceId]/streams" ;
30
30
import { trimMiddle } from "../../lib/shared/strings" ;
31
31
import { countries } from "../../lib/shared/countries" ;
32
+ import type { RefSelectProps } from "antd/es/select" ;
32
33
33
34
import zlib from "zlib" ;
34
35
import {
@@ -247,6 +248,14 @@ const EventsBrowser0 = ({
247
248
destination = { entity [ 1 ] . destination }
248
249
/>
249
250
) ,
251
+ search : ( entity [ 1 ] . type === "stream"
252
+ ? [ entity [ 1 ] . name ]
253
+ : entity [ 1 ] . type === "profile-builder"
254
+ ? [ entity [ 1 ] . name , entity [ 1 ] . destination ?. name ]
255
+ : [ entity [ 1 ] . stream ?. name , entity [ 1 ] . service ?. name , entity [ 1 ] . destination ?. name ]
256
+ )
257
+ . filter ( s => s !== undefined )
258
+ . map ( s => s . toLowerCase ( ) ) ,
250
259
} ) ) ;
251
260
} else {
252
261
return [ ] ;
@@ -285,6 +294,8 @@ const EventsBrowser0 = ({
285
294
286
295
const eventsLogApi = useEventsLogApi ( ) ;
287
296
297
+ const entitySelectRef = React . createRef < RefSelectProps > ( ) ;
298
+
288
299
useEffect ( ( ) => {
289
300
if ( ! actorId || ! entitiesMap [ actorId ] ) {
290
301
if ( entities . length > 0 ) {
@@ -465,6 +476,7 @@ const EventsBrowser0 = ({
465
476
< div >
466
477
< span > { entityType == "stream" ? "Site: " : "Connection: " } </ span >
467
478
< Select
479
+ ref = { entitySelectRef }
468
480
popupMatchSelectWidth = { false }
469
481
notFoundContent = {
470
482
entityType === "stream" ? (
@@ -493,6 +505,9 @@ const EventsBrowser0 = ({
493
505
} }
494
506
value = { actorId }
495
507
options = { entitiesSelectOptions }
508
+ showSearch = { true }
509
+ filterOption = { ( input , option ) => option ?. search . some ( s => s . includes ( input . toLowerCase ( ) ) ) || false }
510
+ onDropdownVisibleChange = { o => ! o && entitySelectRef . current ?. blur ( ) }
496
511
/>
497
512
</ div >
498
513
< div >
0 commit comments