From 61cff3eb7114918c13490ee7f5c18bdb2081b1ee Mon Sep 17 00:00:00 2001 From: Janne Savolainen Date: Fri, 1 Apr 2022 13:36:27 +0300 Subject: [PATCH] Revert breaking change by making id for select optional (#5164) Signed-off-by: Janne Savolainen --- src/renderer/components/select/select.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/renderer/components/select/select.tsx b/src/renderer/components/select/select.tsx index cf22511ce2..9de1944408 100644 --- a/src/renderer/components/select/select.tsx +++ b/src/renderer/components/select/select.tsx @@ -31,7 +31,7 @@ export interface SelectOption { } export interface SelectProps extends ReactSelectProps, CreatableProps { - 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; @@ -122,7 +122,7 @@ export class Select extends React.Component { const selectProps: Partial = { ...props, - inputId, + ...(inputId ? { inputId }: {}), styles: this.styles, value: autoConvertOptions ? this.selectedOption : value, options: autoConvertOptions ? this.options : options,