File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed
sde_indexing_helper/static/js Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -405,6 +405,28 @@ $(document).ready(function () {
405
405
"Connector Type" ,
406
406
] ;
407
407
408
+ // Event listener for the collection search input
409
+ $ ( '#collectionSearch' ) . on ( 'keyup' , function ( ) {
410
+ // Get the search query
411
+ let query = $ ( this ) . val ( ) . toLowerCase ( ) ;
412
+
413
+ // Clear previous search
414
+ table . search ( '' ) . columns ( ) . search ( '' ) ;
415
+
416
+ // Filter the table based on the query in the collection name and config folder data attribute
417
+ table . rows ( ) . every ( function ( ) {
418
+ let row = $ ( this . node ( ) ) ;
419
+ let name = row . find ( 'td' ) . first ( ) . text ( ) . toLowerCase ( ) ;
420
+ let configFolder = row . data ( 'config-folder' ) . toLowerCase ( ) ;
421
+
422
+ if ( name . includes ( query ) || configFolder . includes ( query ) ) {
423
+ row . show ( ) ;
424
+ } else {
425
+ row . hide ( ) ;
426
+ }
427
+ } ) ;
428
+ } ) ;
429
+
408
430
$ ( ".dtsp-searchPane" ) . each ( function ( index ) {
409
431
if ( $ ( this ) . hasClass ( "dtsp-hidden" ) ) {
410
432
return ;
You can’t perform that action at this time.
0 commit comments