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:
parent
3a26ea7b7f
commit
61cff3eb71
@ -31,7 +31,7 @@ export interface SelectOption<T = any> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export interface SelectProps<T = any> extends ReactSelectProps<T, boolean>, CreatableProps<T, boolean> {
|
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;
|
value?: T;
|
||||||
themeName?: "dark" | "light" | "outlined" | "lens";
|
themeName?: "dark" | "light" | "outlined" | "lens";
|
||||||
menuClass?: string;
|
menuClass?: string;
|
||||||
@ -122,7 +122,7 @@ export class Select extends React.Component<SelectProps> {
|
|||||||
|
|
||||||
const selectProps: Partial<SelectProps> = {
|
const selectProps: Partial<SelectProps> = {
|
||||||
...props,
|
...props,
|
||||||
inputId,
|
...(inputId ? { inputId }: {}),
|
||||||
styles: this.styles,
|
styles: this.styles,
|
||||||
value: autoConvertOptions ? this.selectedOption : value,
|
value: autoConvertOptions ? this.selectedOption : value,
|
||||||
options: autoConvertOptions ? this.options : options,
|
options: autoConvertOptions ? this.options : options,
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user