1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00

Revert breaking change by making id for select optional (#5164)

Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
This commit is contained in:
Janne Savolainen 2022-04-01 13:36:27 +03:00 committed by GitHub
parent 3a26ea7b7f
commit 61cff3eb71
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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;
@ -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,