@@ -63,7 +63,7 @@ export class ListboxPattern<V> {
63
63
activedescendant = computed ( ( ) => this . focusManager . getActiveDescendant ( ) ) ;
64
64
65
65
/** Whether multiple items in the list can be selected at once. */
66
- multiselectable : SignalLike < boolean > ;
66
+ multi : SignalLike < boolean > ;
67
67
68
68
/** The number of items in the listbox. */
69
69
setsize = computed ( ( ) => this . navigation . inputs . items ( ) . length ) ;
@@ -112,7 +112,7 @@ export class ListboxPattern<V> {
112
112
. on ( this . typeaheadRegexp , e => this . search ( e . key , { selectOne : true } ) ) ;
113
113
}
114
114
115
- if ( this . inputs . multiselectable ( ) ) {
115
+ if ( this . inputs . multi ( ) ) {
116
116
manager
117
117
. on ( Modifier . Shift , ' ' , ( ) => this . _updateSelection ( { selectFromAnchor : true } ) )
118
118
. on ( Modifier . Shift , 'Enter' , ( ) => this . _updateSelection ( { selectFromAnchor : true } ) )
@@ -123,17 +123,17 @@ export class ListboxPattern<V> {
123
123
. on ( Modifier . Ctrl , 'A' , ( ) => this . _updateSelection ( { selectAll : true } ) ) ;
124
124
}
125
125
126
- if ( ! this . followFocus ( ) && this . inputs . multiselectable ( ) ) {
126
+ if ( ! this . followFocus ( ) && this . inputs . multi ( ) ) {
127
127
manager . on ( ' ' , ( ) => this . _updateSelection ( { toggle : true } ) ) ;
128
128
manager . on ( 'Enter' , ( ) => this . _updateSelection ( { toggle : true } ) ) ;
129
129
}
130
130
131
- if ( ! this . followFocus ( ) && ! this . inputs . multiselectable ( ) ) {
131
+ if ( ! this . followFocus ( ) && ! this . inputs . multi ( ) ) {
132
132
manager . on ( ' ' , ( ) => this . _updateSelection ( { toggleOne : true } ) ) ;
133
133
manager . on ( 'Enter' , ( ) => this . _updateSelection ( { toggleOne : true } ) ) ;
134
134
}
135
135
136
- if ( this . inputs . multiselectable ( ) && this . followFocus ( ) ) {
136
+ if ( this . inputs . multi ( ) && this . followFocus ( ) ) {
137
137
manager
138
138
. on ( Modifier . Ctrl , this . prevKey , ( ) => this . prev ( ) )
139
139
. on ( Modifier . Ctrl , this . nextKey , ( ) => this . next ( ) )
@@ -150,7 +150,7 @@ export class ListboxPattern<V> {
150
150
pointerdown = computed ( ( ) => {
151
151
const manager = new PointerEventManager ( ) ;
152
152
153
- if ( this . inputs . multiselectable ( ) ) {
153
+ if ( this . inputs . multi ( ) ) {
154
154
manager
155
155
. on ( e => this . goto ( e , { toggle : true } ) )
156
156
. on ( Modifier . Shift , e => this . goto ( e , { selectFromActive : true } ) ) ;
@@ -164,7 +164,7 @@ export class ListboxPattern<V> {
164
164
constructor ( readonly inputs : ListboxInputs < V > ) {
165
165
this . disabled = inputs . disabled ;
166
166
this . orientation = inputs . orientation ;
167
- this . multiselectable = inputs . multiselectable ;
167
+ this . multi = inputs . multi ;
168
168
169
169
this . navigation = new ListNavigation ( inputs ) ;
170
170
this . selection = new ListSelection ( { ...inputs , navigation : this . navigation } ) ;
0 commit comments