diff --git a/.eslintrc b/.eslintrc
index a1d9e0450..18adea489 100644
--- a/.eslintrc
+++ b/.eslintrc
@@ -28,6 +28,7 @@
}
],
"react/display-name": "off",
+ "@typescript-eslint/explicit-module-boundary-types": "off",
// rules below are to override nulogy config
"react/jsx-filename-extension": [
1,
diff --git a/src/Select/Select.tsx b/src/Select/Select.tsx
index db67d1297..6df598995 100644
--- a/src/Select/Select.tsx
+++ b/src/Select/Select.tsx
@@ -1,104 +1,54 @@
-import React, { ReactNode } from "react";
-import propTypes from "@styled-system/prop-types";
+import React, { forwardRef, ReactNode, MutableRefObject } from "react";
+import Select from "react-select/base";
import WindowedSelect, { GroupBase } from "react-windowed-select";
-import type { MenuPlacement, MenuPosition, Props as SelectProps } from "react-select";
+import type { Props as SelectProps } from "react-select";
import { useTranslation } from "react-i18next";
-import { ThemeContext } from "styled-components";
+import { useTheme } from "styled-components";
+import propTypes from "@styled-system/prop-types";
import { Field } from "../Form";
import { MaybeFieldLabel } from "../FieldLabel";
import { InlineValidation } from "../Validation";
+import customStyles from "../Select/customReactSelectStyles";
import { getSubset } from "../utils/subset";
+import { SelectControl } from "../AsyncSelect/AsyncSelectComponents";
import { ComponentSize, useComponentSize } from "../NDSProvider/ComponentSizeContext";
-import customStyles from "./customReactSelectStyles";
-import { SelectOption } from "./SelectOption";
-
import {
- SelectControl,
SelectMultiValue,
SelectClearIndicator,
SelectContainer,
- SelectMenu,
SelectInput,
SelectDropdownIndicator,
+ SelectMenu,
} from "./SelectComponents";
+import { SelectOption } from "./SelectOption";
-type ReactSelectStateManager = {
- state: {
- value: any[];
- };
- setState: (prevState: any) => void;
- blur: () => void;
-};
-
-// NOTE: We recreate these props as upstream doesn't export them. Note also that
-// we have a default value for windowThreshold, therefore this param is optional.
-interface WindowedSelectProps extends SelectProps {
- windowThreshold?: number;
-}
-
-interface NDSOptionType {
- label: string;
- value: unknown;
+interface WindowedSelectProps