Skip to content

Instantly share code, notes, and snippets.

@jon-r
Created October 23, 2018 08:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jon-r/3078a56733440dcdf8d87c98219450b2 to your computer and use it in GitHub Desktop.
Save jon-r/3078a56733440dcdf8d87c98219450b2 to your computer and use it in GitHub Desktop.
import * as React from 'react';
import AutoComplete, {AutoCompleteProps} from 'antd/lib/auto-complete';
interface IProps {
onFocus: any;
onBlur: any;
otherProps: AutoCompleteProps;
}
// onBlur is fine, onFocus has a typeError
export const ErrorType: React.SFC<IProps> = ({onFocus, onBlur, otherProps}) => (
<AutoComplete onFocus={onFocus} onBlur={onBlur} {...otherProps} />
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment