Update dependency react-select to v5 (#41604)

* Update dependency react-select to v5

* Remove @types/react-select and update types accordingly

* Fix all unit tests

* Add @ts-expect-error to individual errors, remove prefix as it doesn't seem to exist?

* Another minor typescript fix

* Apply fixes from torkel's PR

* Fix last typescript error

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
This commit is contained in:
renovate[bot]
2021-11-23 12:11:26 +00:00
committed by GitHub
parent 6b79393ccc
commit 035e676cad
24 changed files with 149 additions and 189 deletions

View File

@@ -7,7 +7,7 @@ import {
} from '@grafana/ui/src/components/Select/SelectContainer';
import { SelectCommonProps } from '@grafana/ui/src/components/Select/types';
import React, { useState } from 'react';
import { GroupTypeBase } from 'react-select';
import { GroupBase } from 'react-select';
interface InlineSelectProps<T> extends SelectCommonProps<T> {
label?: string;
@@ -38,7 +38,7 @@ function InlineSelect<T>({ label: labelProp, ...props }: InlineSelectProps<T>) {
export default InlineSelect;
const SelectContainer = <Option, isMulti extends boolean, Group extends GroupTypeBase<Option>>(
const SelectContainer = <Option, isMulti extends boolean, Group extends GroupBase<Option>>(
props: ContainerProps<Option, isMulti, Group>
) => {
const { children } = props;
@@ -53,7 +53,7 @@ const SelectContainer = <Option, isMulti extends boolean, Group extends GroupTyp
);
};
const ValueContainer = <Option, isMulti extends boolean, Group extends GroupTypeBase<Option>>(
const ValueContainer = <Option, isMulti extends boolean, Group extends GroupBase<Option>>(
props: ContainerProps<Option, isMulti, Group>
) => {
const { className, children } = props;