Skip to content

Commit

Permalink
Revert breaking change by making id for select optional (#5164)
Browse files Browse the repository at this point in the history
Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
  • Loading branch information
jansav authored Apr 1, 2022
1 parent 3a26ea7 commit 61cff3e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/renderer/components/select/select.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export interface SelectOption<T = any> {
}

export interface SelectProps<T = any> extends ReactSelectProps<T, boolean>, CreatableProps<T, boolean> {
id: string;
id?: string; // Optional only because of Extension API. Required to make Select deterministic in unit tests
value?: T;
themeName?: "dark" | "light" | "outlined" | "lens";
menuClass?: string;
Expand Down Expand Up @@ -122,7 +122,7 @@ export class Select extends React.Component<SelectProps> {

const selectProps: Partial<SelectProps> = {
...props,
inputId,
...(inputId ? { inputId }: {}),
styles: this.styles,
value: autoConvertOptions ? this.selectedOption : value,
options: autoConvertOptions ? this.options : options,
Expand Down

0 comments on commit 61cff3e

Please sign in to comment.