@@ -140,25 +140,20 @@ class ActionItemRenderer<T extends IListMenuItem<IActionItem>> implements IListR
140140
141141export class ActionList < T extends IActionItem > extends Disposable {
142142
143- readonly domNode : HTMLElement ;
143+ public readonly domNode : HTMLElement ;
144+
144145 private readonly _list : List < IListMenuItem < IActionItem > > ;
145146
146147 private readonly _actionLineHeight = 24 ;
147148 private readonly _headerLineHeight = 26 ;
148149
149150 private readonly _allMenuItems : IListMenuItem < IActionItem > [ ] ;
150151
151- private focusCondition ( element : IListMenuItem < IActionItem > ) : boolean {
152- return ! element . disabled && element . kind === ActionListItemKind . Action ;
153- }
154-
155152 constructor (
156153 user : string ,
157- items : readonly T [ ] ,
158- showHeaders : boolean ,
154+ items : IListMenuItem < T > [ ] ,
159155 private readonly _delegate : IRenderDelegate ,
160156 resolver : IActionKeybindingResolver | undefined ,
161- toMenuItems : ( inputActions : readonly T [ ] , showHeaders : boolean ) => IListMenuItem < T > [ ] ,
162157 @IContextViewService private readonly _contextViewService : IContextViewService ,
163158 @IKeybindingService private readonly _keybindingService : IKeybindingService
164159 ) {
@@ -194,11 +189,15 @@ export class ActionList<T extends IActionItem> extends Disposable {
194189 this . _register ( this . _list . onDidChangeFocus ( ( ) => this . _list . domFocus ( ) ) ) ;
195190 this . _register ( this . _list . onDidChangeSelection ( e => this . onListSelection ( e ) ) ) ;
196191
197- this . _allMenuItems = toMenuItems ( items , showHeaders ) ;
192+ this . _allMenuItems = items ;
198193 this . _list . splice ( 0 , this . _list . length , this . _allMenuItems ) ;
199194 this . focusNext ( ) ;
200195 }
201196
197+ private focusCondition ( element : IListMenuItem < IActionItem > ) : boolean {
198+ return ! element . disabled && element . kind === ActionListItemKind . Action ;
199+ }
200+
202201 hide ( didCancel ?: boolean ) : void {
203202 this . _delegate . onHide ( didCancel ) ;
204203 this . _contextViewService . hideContextView ( ) ;
0 commit comments