refactor: flow typing (#1012)
* fix: padding * fix: Minor button alignment issues * feat: Add icon to invite people button * WIP
This commit is contained in:
@@ -4,6 +4,7 @@ import ReactDOM from 'react-dom';
|
||||
import keydown from 'react-keydown';
|
||||
import Waypoint from 'react-waypoint';
|
||||
import { withRouter, Link } from 'react-router-dom';
|
||||
import type { Location, RouterHistory } from 'react-router-dom';
|
||||
import { observable, action } from 'mobx';
|
||||
import { observer, inject } from 'mobx-react';
|
||||
import { debounce } from 'lodash';
|
||||
@@ -32,9 +33,9 @@ import UserFilter from './components/UserFilter';
|
||||
import DateFilter from './components/DateFilter';
|
||||
|
||||
type Props = {
|
||||
history: Object,
|
||||
history: RouterHistory,
|
||||
match: Object,
|
||||
location: Object,
|
||||
location: Location,
|
||||
documents: DocumentsStore,
|
||||
users: UsersStore,
|
||||
notFound: ?boolean,
|
||||
|
||||
@@ -5,18 +5,18 @@ import { SearchIcon } from 'outline-icons';
|
||||
import Flex from 'shared/components/Flex';
|
||||
|
||||
type Props = {
|
||||
onChange: string => *,
|
||||
onChange: string => void,
|
||||
theme: Object,
|
||||
};
|
||||
|
||||
class SearchField extends React.Component<Props> {
|
||||
input: ?HTMLInputElement;
|
||||
|
||||
handleChange = (ev: SyntheticEvent<*>) => {
|
||||
handleChange = (ev: SyntheticEvent<HTMLInputElement>) => {
|
||||
this.props.onChange(ev.currentTarget.value ? ev.currentTarget.value : '');
|
||||
};
|
||||
|
||||
focusInput = (ev: SyntheticEvent<*>) => {
|
||||
focusInput = (ev: SyntheticEvent<>) => {
|
||||
if (this.input) this.input.focus();
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user