mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
fix select.test.tsx
Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
parent
4bf4089346
commit
dc3dffc2fc
@ -14,7 +14,6 @@ import ReactSelect, { components } from "react-select";
|
||||
import type { Props as ReactSelectProps, GroupBase } from "react-select";
|
||||
import { ThemeStore } from "../../theme.store";
|
||||
import { autoBind, cssNames } from "../../utils";
|
||||
import { merge } from "lodash";
|
||||
|
||||
const { Menu } = components;
|
||||
|
||||
@ -65,6 +64,7 @@ export class Select<Option, IsMulti extends boolean = false, Group extends Group
|
||||
menuClass,
|
||||
components = {},
|
||||
styles,
|
||||
value = null,
|
||||
...props
|
||||
} = this.props;
|
||||
const WrappedMenu = components.Menu ?? Menu;
|
||||
@ -72,12 +72,14 @@ export class Select<Option, IsMulti extends boolean = false, Group extends Group
|
||||
return (
|
||||
<ReactSelect
|
||||
{...props}
|
||||
styles={merge(styles, {
|
||||
styles={{
|
||||
menuPortal: styles => ({
|
||||
...styles,
|
||||
zIndex: "auto",
|
||||
}),
|
||||
})}
|
||||
...styles,
|
||||
}}
|
||||
value={value}
|
||||
onKeyDown={this.onKeyDown}
|
||||
className={cssNames("Select", this.themeClass, className)}
|
||||
classNamePrefix="Select"
|
||||
|
||||
@ -34,6 +34,7 @@ import joinPathsInjectable from "../common/path/join-paths.injectable";
|
||||
import { joinPathsFake } from "../common/test-utils/join-paths-fake";
|
||||
import hotbarStoreInjectable from "../common/hotbar-store.injectable";
|
||||
import terminalSpawningPoolInjectable from "./components/dock/terminal/terminal-spawning-pool.injectable";
|
||||
import hostedClusterIdInjectable from "../common/cluster-store/hosted-cluster-id.injectable";
|
||||
|
||||
export const getDiForUnitTesting = (
|
||||
{ doGeneralOverrides } = { doGeneralOverrides: false },
|
||||
@ -59,6 +60,7 @@ export const getDiForUnitTesting = (
|
||||
di.override(isLinuxInjectable, () => false);
|
||||
|
||||
di.override(terminalSpawningPoolInjectable, () => new HTMLElement());
|
||||
di.override(hostedClusterIdInjectable, () => undefined);
|
||||
|
||||
di.override(getAbsolutePathInjectable, () => getAbsolutePathFake);
|
||||
di.override(joinPathsInjectable, () => joinPathsFake);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user