File tree 1 file changed +10
-5
lines changed
src/cdk-experimental/ui-patterns/listbox
1 file changed +10
-5
lines changed Original file line number Diff line number Diff line change 7
7
*/
8
8
9
9
import { computed , Signal } from '@angular/core' ;
10
- import { ListSelectionItem } from '../behaviors/list-selection/list-selection' ;
10
+ import { ListSelection , ListSelectionItem } from '../behaviors/list-selection/list-selection' ;
11
11
import { 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
+ }
15
20
16
21
/** The required inputs to options. */
17
22
export interface OptionInputs
@@ -36,7 +41,7 @@ export class OptionPattern {
36
41
) ;
37
42
38
43
/** 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 ( ) ) ) ;
40
45
41
46
/** Whether the option is disabled. */
42
47
disabled : Signal < boolean > ;
You can’t perform that action at this time.
0 commit comments