mirror of
https://github.com/grafana/grafana.git
synced 2025-02-14 01:23:32 -06:00
Update typescript notifications #13425
This commit is contained in:
parent
2d65845bac
commit
a29d80df4e
@ -2,14 +2,12 @@ import React from 'react';
|
|||||||
import { components } from 'react-select';
|
import { components } from 'react-select';
|
||||||
import { OptionProps } from 'react-select/lib/components/Option';
|
import { OptionProps } from 'react-select/lib/components/Option';
|
||||||
|
|
||||||
export interface Props {
|
// https://github.com/JedWatson/react-select/issues/3038
|
||||||
children: Element;
|
interface ExtendedOptionProps extends OptionProps<any> {
|
||||||
isSelected: boolean;
|
|
||||||
data: any;
|
data: any;
|
||||||
getStyles: any;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export const Option = (props: OptionProps<any>) => {
|
export const Option = (props: ExtendedOptionProps) => {
|
||||||
const { children, isSelected, data } = props;
|
const { children, isSelected, data } = props;
|
||||||
return (
|
return (
|
||||||
<components.Option {...props}>
|
<components.Option {...props}>
|
||||||
|
@ -7,6 +7,20 @@ const model = {
|
|||||||
clearValue: jest.fn(),
|
clearValue: jest.fn(),
|
||||||
onSelect: jest.fn(),
|
onSelect: jest.fn(),
|
||||||
getStyles: jest.fn(),
|
getStyles: jest.fn(),
|
||||||
|
getValue: jest.fn(),
|
||||||
|
hasValue: true,
|
||||||
|
isMulti: false,
|
||||||
|
options: [],
|
||||||
|
selectOption: jest.fn(),
|
||||||
|
selectProps: {},
|
||||||
|
setValue: jest.fn(),
|
||||||
|
isDisabled: false,
|
||||||
|
isFocused: false,
|
||||||
|
isSelected: false,
|
||||||
|
innerRef: null,
|
||||||
|
innerProps: null,
|
||||||
|
label: 'Option label',
|
||||||
|
type: null,
|
||||||
children: 'Model title',
|
children: 'Model title',
|
||||||
data: {
|
data: {
|
||||||
title: 'Model title',
|
title: 'Model title',
|
||||||
|
Loading…
Reference in New Issue
Block a user