Browse Source

fix: Proper types for linter

Johannes Schill 7 years ago
parent
commit
47d86ee818
1 changed files with 3 additions and 3 deletions
  1. 3 3
      public/app/core/components/PageHeader/PageHeader.tsx

+ 3 - 3
public/app/core/components/PageHeader/PageHeader.tsx

@@ -1,4 +1,4 @@
-import React from 'react';
+import React, { FormEvent } from 'react';
 import { NavModel, NavModelItem } from 'app/types';
 import { NavModel, NavModelItem } from 'app/types';
 import classNames from 'classnames';
 import classNames from 'classnames';
 import appEvents from 'app/core/app_events';
 import appEvents from 'app/core/app_events';
@@ -12,8 +12,8 @@ const SelectNav = ({ main, customCss }: { main: NavModelItem; customCss: string
     return navItem.active === true;
     return navItem.active === true;
   });
   });
 
 
-  const gotoUrl = evt => {
-    const element = evt.target;
+  const gotoUrl = (evt: FormEvent) => {
+    const element = evt.target as HTMLSelectElement;
     const url = element.options[element.selectedIndex].value;
     const url = element.options[element.selectedIndex].value;
     appEvents.emit('location-change', { href: url });
     appEvents.emit('location-change', { href: url });
   };
   };