@@ -411,12 +411,12 @@ export const groupMultiselect = <Options extends Option<Value>[], Value extends
411411 | 'group-active-selected'
412412 | 'submitted'
413413 | 'cancelled' ,
414- options : Options = [ ] as any
414+ options : Options [ number ] [ ] = [ ] as any
415415 ) => {
416416 const label = option . label ?? String ( option . value ) ;
417- const isItem = typeof option . group === 'string' ;
417+ const isItem = typeof ( option as any ) . group === 'string' ;
418418 const next = isItem && ( options [ options . indexOf ( option ) + 1 ] ?? { group : true } ) ;
419- const isLast = isItem && next . group === true ;
419+ const isLast = isItem && ( next as any ) . group === true ;
420420 const prefix = isItem ? `${ isLast ? S_BAR_END : S_BAR } ` : '' ;
421421
422422 if ( state === 'active' ) {
@@ -486,7 +486,7 @@ export const groupMultiselect = <Options extends Option<Value>[], Value extends
486486 . map ( ( option , i , options ) => {
487487 const selected =
488488 this . value . includes ( option . value ) ||
489- ( option . group === true && this . isGroupSelected ( option . value ) ) ;
489+ ( option . group === true && this . isGroupSelected ( ` ${ option . value } ` ) ) ;
490490 const active = i === this . cursor ;
491491 const groupActive =
492492 ! active &&
@@ -510,7 +510,7 @@ export const groupMultiselect = <Options extends Option<Value>[], Value extends
510510 . map ( ( option , i , options ) => {
511511 const selected =
512512 this . value . includes ( option . value ) ||
513- ( option . group === true && this . isGroupSelected ( option . value ) ) ;
513+ ( option . group === true && this . isGroupSelected ( ` ${ option . value } ` ) ) ;
514514 const active = i === this . cursor ;
515515 const groupActive =
516516 ! active &&
0 commit comments