Skip to content

Commit

Permalink
[quick-pick] fix #7802: always accept items on type callback
Browse files Browse the repository at this point in the history
Signed-off-by: Anton Kosyakov <anton.kosyakov@typefox.io>
  • Loading branch information
akosyakov committed May 13, 2020
1 parent 1b0b6d9 commit 09d90c4
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ export class QuickPickServiceImpl implements QuickPickService {
private readonly onDidChangeSelectionEmitter = new Emitter<(string | QuickPickValue<Object>)[]>();
readonly onDidChangeSelection = this.onDidChangeSelectionEmitter.event;

// TODO when to release last elements?
private elements: (string | QuickPickItem<Object>)[] = [];

@postConstruct()
Expand Down Expand Up @@ -81,8 +82,8 @@ export class QuickPickServiceImpl implements QuickPickService {
if (this.elements !== elements) {
elements = this.elements;
items = this.toItems(elements, resolve);
acceptor(items);
}
acceptor(items);
if (savedValue !== value) {
this.onDidChangeValueEmitter.fire(value);
savedValue = value;
Expand Down

0 comments on commit 09d90c4

Please sign in to comment.