Skip to content

Commit

Permalink
Address Review Comments #12713
Browse files Browse the repository at this point in the history
  • Loading branch information
jfaltermeier committed Aug 7, 2023
1 parent d98021b commit 3427e1a
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,15 @@ import { escapeInvisibleChars } from '@theia/core/lib/common/strings';
export class PreferenceSelectInputRenderer extends PreferenceLeafNodeRenderer<JSONValue, HTMLDivElement> {

protected readonly selectComponent = React.createRef<SelectComponent>();
protected readonly selectOptions: SelectOption[] = [];

protected selectOptions: SelectOption[] = [];

protected get enumValues(): JSONValue[] {
return this.preferenceNode.preference.data.enum!;
}

protected updateSelectOptions(): void {
this.selectOptions.splice(0);
const updatedSelectOptions: SelectOption[] = [];
const values = this.enumValues;
const preferenceData = this.preferenceNode.preference.data;
const defaultValue = preferenceData.default;
Expand All @@ -52,14 +53,15 @@ export class PreferenceSelectInputRenderer extends PreferenceLeafNodeRenderer<JS
enumDescription = this.markdownRenderer.renderInline(markdownEnumDescription);
markdown = true;
}
this.selectOptions.push({
updatedSelectOptions.push({
label,
value: stringValue,
detail,
description: enumDescription,
markdown
});
}
this.selectOptions = updatedSelectOptions;
}

protected createInteractable(parent: HTMLElement): void {
Expand Down

0 comments on commit 3427e1a

Please sign in to comment.