mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Chore: Typescript no-implicit any fixes progress (#17018)
* Chore: Typescript no-implicit any fixes progress * Fixed tests * Updated snapshot
This commit is contained in:
@@ -55,11 +55,11 @@ export interface CommonProps<T> {
|
||||
onCloseMenu?: () => void;
|
||||
}
|
||||
|
||||
export interface SelectProps<T> {
|
||||
export interface SelectProps<T> extends CommonProps<T> {
|
||||
options: Array<SelectOptionItem<T>>;
|
||||
}
|
||||
|
||||
interface AsyncProps<T> {
|
||||
interface AsyncProps<T> extends CommonProps<T> {
|
||||
defaultOptions: boolean;
|
||||
loadOptions: (query: string) => Promise<Array<SelectOptionItem<T>>>;
|
||||
loadingMessage?: () => string;
|
||||
@@ -95,9 +95,8 @@ export const MenuList = (props: any) => {
|
||||
);
|
||||
};
|
||||
|
||||
export class Select<T> extends PureComponent<CommonProps<T> & SelectProps<T>> {
|
||||
static defaultProps = {
|
||||
width: null,
|
||||
export class Select<T> extends PureComponent<SelectProps<T>> {
|
||||
static defaultProps: Partial<SelectProps<any>> = {
|
||||
className: '',
|
||||
isDisabled: false,
|
||||
isSearchable: true,
|
||||
@@ -108,7 +107,7 @@ export class Select<T> extends PureComponent<CommonProps<T> & SelectProps<T>> {
|
||||
isLoading: false,
|
||||
backspaceRemovesValue: true,
|
||||
maxMenuHeight: 300,
|
||||
menuIsOpen: false,
|
||||
isOpen: false,
|
||||
components: {
|
||||
Option: SelectOption,
|
||||
SingleValue,
|
||||
@@ -201,9 +200,8 @@ export class Select<T> extends PureComponent<CommonProps<T> & SelectProps<T>> {
|
||||
}
|
||||
}
|
||||
|
||||
export class AsyncSelect<T> extends PureComponent<CommonProps<T> & AsyncProps<T>> {
|
||||
static defaultProps = {
|
||||
width: null,
|
||||
export class AsyncSelect<T> extends PureComponent<AsyncProps<T>> {
|
||||
static defaultProps: Partial<AsyncProps<any>> = {
|
||||
className: '',
|
||||
components: {},
|
||||
loadingMessage: () => 'Loading...',
|
||||
|
||||
@@ -7,11 +7,13 @@ export interface NavModelItem {
|
||||
id?: string;
|
||||
active?: boolean;
|
||||
hideFromTabs?: boolean;
|
||||
hideFromMenu?: boolean;
|
||||
divider?: boolean;
|
||||
children?: NavModelItem[];
|
||||
breadcrumbs?: NavModelBreadcrumb[];
|
||||
target?: string;
|
||||
parentItem?: NavModelItem;
|
||||
showOrgSwitcher?: boolean;
|
||||
}
|
||||
|
||||
export interface NavModel {
|
||||
|
||||
Reference in New Issue
Block a user