fix: Proper types for linter

This commit is contained in:
Johannes Schill 2019-01-10 08:36:38 +01:00
parent 9e0e91a90a
commit 47d86ee818

View File

@ -1,4 +1,4 @@
import React from 'react';
import React, { FormEvent } from 'react';
import { NavModel, NavModelItem } from 'app/types';
import classNames from 'classnames';
import appEvents from 'app/core/app_events';
@ -12,8 +12,8 @@ const SelectNav = ({ main, customCss }: { main: NavModelItem; customCss: string
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;
appEvents.emit('location-change', { href: url });
};