You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import * as React from 'react';
import * as ReactDOM from 'react-dom';
import { Input } from 'semantic-ui-react';
ReactDOM.render(
<Input ref={(i) => { if (i) { i.focus(); } }} />,
document.getElementById('root') as HTMLElement
);
Expected Result
It compiles and work.
The same example works with Babel using ES6 only (no TypeScript, as with create-react-app).
Actual Result
It fails to compile with error:
(6,37): error TS2339: Property 'focus' does not exist on type 'Component<InputProps, ComponentState>'.
Version
0.71.4
(React 15.6.1)
The text was updated successfully, but these errors were encountered:
layershifter
changed the title
error TS2339: Property 'focus' does not exist on type 'Component<InputProps, ComponentState>'
Input: 'focus' method does not exist in typings
Aug 16, 2017
Steps
This example was tested using create-react-app-typescript
Expected Result
It compiles and work.
The same example works with Babel using ES6 only (no TypeScript, as with create-react-app).
Actual Result
It fails to compile with error:
Version
0.71.4
(React 15.6.1)
The text was updated successfully, but these errors were encountered: