Skip to content

Commit f4e50f2

Browse files
authored
use Event.None when not having/wanting check-boxes in quick pick (microsoft#184693)
re microsoft#184615
1 parent eac16e9 commit f4e50f2

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/vs/platform/quickinput/browser/quickInputList.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,9 @@ class ListElement implements IListElement {
100100
this.fireButtonTriggered = fireButtonTriggered;
101101
this.fireSeparatorButtonTriggered = fireSeparatorButtonTriggered;
102102
this._onChecked = onCheckedEmitter;
103-
this.onChecked = Event.map(Event.filter<{ listElement: IListElement; checked: boolean }>(this._onChecked.event, e => e.listElement === this), e => e.checked);
103+
this.onChecked = hasCheckbox
104+
? Event.map(Event.filter<{ listElement: IListElement; checked: boolean }>(this._onChecked.event, e => e.listElement === this), e => e.checked)
105+
: Event.None;
104106

105107
if (mainItem.type === 'separator') {
106108
this._separator = mainItem;

0 commit comments

Comments
 (0)