Browse Source

Fixing TS and updating snapshot

Dominik Prokop 7 years ago
parent
commit
53f0f08efa

+ 3 - 0
packages/grafana-ui/src/components/Select/IndicatorsContainer.tsx

@@ -1,4 +1,7 @@
 import React from 'react';
+
+// Ignoring because I couldn't get @types/react-select work wih Torkel's fork
+// @ts-ignore
 import { components } from '@torkelo/react-select';
 
 export const IndicatorsContainer = (props: any) => {

+ 4 - 0
packages/grafana-ui/src/components/Select/NoOptionsMessage.tsx

@@ -1,5 +1,9 @@
 import React from 'react';
+
+// Ignoring because I couldn't get @types/react-select work wih Torkel's fork
+// @ts-ignore
 import { components } from '@torkelo/react-select';
+// @ts-ignore
 import { OptionProps } from '@torkelo/react-select/lib/components/Option';
 
 export interface Props {

+ 0 - 2
packages/grafana-ui/src/components/Select/PickerOption.test.tsx

@@ -38,9 +38,7 @@ describe('PickerOption', () => {
         <PickerOption
           {...model}
           data={{
-            title: 'Model title',
             imgUrl: 'url/to/avatar',
-            label: 'User picker label',
           }}
         />
       )

+ 3 - 0
packages/grafana-ui/src/components/Select/PickerOption.tsx

@@ -1,4 +1,7 @@
 import React from 'react';
+
+// Ignoring because I couldn't get @types/react-select work wih Torkel's fork
+// @ts-ignore
 import { components } from '@torkelo/react-select';
 import { OptionProps } from 'react-select/lib/components/Option';
 

+ 5 - 0
packages/grafana-ui/src/components/Select/Select.tsx

@@ -1,8 +1,13 @@
 // Libraries
 import classNames from 'classnames';
 import React, { PureComponent } from 'react';
+
+// Ignoring because I couldn't get @types/react-select work wih Torkel's fork
+// @ts-ignore
 import { default as ReactSelect } from '@torkelo/react-select';
+// @ts-ignore
 import { default as ReactAsyncSelect } from '@torkelo/react-select/lib/Async';
+// @ts-ignore
 import { components } from '@torkelo/react-select';
 
 // Components

+ 6 - 1
public/app/core/components/Select/__snapshots__/PickerOption.test.tsx.snap → packages/grafana-ui/src/components/Select/__snapshots__/PickerOption.test.tsx.snap

@@ -1,7 +1,12 @@
 // Jest Snapshot v1, https://goo.gl/fbAQLP
 
 exports[`PickerOption renders correctly 1`] = `
-<div>
+<div
+  id=""
+  onClick={[MockFunction]}
+  onMouseOver={[MockFunction]}
+  tabIndex={1}
+>
   <div
     className="gf-form-select-box__desc-option"
   >