File tree Expand file tree Collapse file tree 1 file changed +10
-5
lines changed
src/cdk-experimental/ui-patterns/listbox Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Original file line number Diff line number Diff line change 77 */
88
99import { computed , Signal } from '@angular/core' ;
10- import { ListSelectionItem } from '../behaviors/list-selection/list-selection' ;
10+ import { ListSelection , ListSelectionItem } from '../behaviors/list-selection/list-selection' ;
1111import { ListTypeaheadItem } from '../behaviors/list-typeahead/list-typeahead' ;
12- import { ListNavigationItem } from '../behaviors/list-navigation/list-navigation' ;
13- import { ListFocusItem } from '../behaviors/list-focus/list-focus' ;
14- import { ListboxPattern } from './listbox' ;
12+ import { ListNavigation , ListNavigationItem } from '../behaviors/list-navigation/list-navigation' ;
13+ import { ListFocus , ListFocusItem } from '../behaviors/list-focus/list-focus' ;
14+
15+ interface ListboxPattern {
16+ focus : ListFocus < OptionPattern > ;
17+ selection : ListSelection < OptionPattern > ;
18+ navigation : ListNavigation < OptionPattern > ;
19+ }
1520
1621/** The required inputs to options. */
1722export interface OptionInputs
@@ -36,7 +41,7 @@ export class OptionPattern {
3641 ) ;
3742
3843 /** Whether the option is selected. */
39- selected = computed ( ( ) => this . listbox ( ) . inputs . selectedIds ( ) . includes ( this . id ( ) ) ) ;
44+ selected = computed ( ( ) => this . listbox ( ) . selection . inputs . selectedIds ( ) . includes ( this . id ( ) ) ) ;
4045
4146 /** Whether the option is disabled. */
4247 disabled : Signal < boolean > ;
You can’t perform that action at this time.
0 commit comments