Upgrade to Flow 0.71
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
// @flow
|
||||
import React, { Component } from 'react';
|
||||
import * as React from 'react';
|
||||
import ReactDOM from 'react-dom';
|
||||
import keydown from 'react-keydown';
|
||||
import Waypoint from 'react-waypoint';
|
||||
@@ -59,9 +59,8 @@ const StyledArrowKeyNavigation = styled(ArrowKeyNavigation)`
|
||||
`;
|
||||
|
||||
@observer
|
||||
class Search extends Component {
|
||||
class Search extends React.Component<Props> {
|
||||
firstDocument: HTMLElement;
|
||||
props: Props;
|
||||
|
||||
@observable resultIds: string[] = []; // Document IDs
|
||||
@observable query: string = '';
|
||||
|
||||
@@ -1,22 +1,23 @@
|
||||
// @flow
|
||||
import React, { Component } from 'react';
|
||||
import * as React from 'react';
|
||||
import styled from 'styled-components';
|
||||
import { SearchIcon } from 'outline-icons';
|
||||
|
||||
import Flex from 'shared/components/Flex';
|
||||
import { color } from 'shared/styles/constants';
|
||||
|
||||
class SearchField extends Component {
|
||||
input: HTMLInputElement;
|
||||
props: {
|
||||
onChange: Function,
|
||||
};
|
||||
type Props = {
|
||||
onChange: string => *,
|
||||
};
|
||||
|
||||
handleChange = (ev: SyntheticEvent) => {
|
||||
class SearchField extends React.Component<Props> {
|
||||
input: HTMLInputElement;
|
||||
|
||||
handleChange = (ev: SyntheticEvent<*>) => {
|
||||
this.props.onChange(ev.currentTarget.value ? ev.currentTarget.value : '');
|
||||
};
|
||||
|
||||
focusInput = (ev: SyntheticEvent) => {
|
||||
focusInput = (ev: SyntheticEvent<*>) => {
|
||||
this.input.focus();
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user