-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(Input|Button|TextArea): add focus
method to typings
#1972
Conversation
2b115bf
to
f062895
Compare
Codecov Report
@@ Coverage Diff @@
## master #1972 +/- ##
======================================
Coverage 99.8% 99.8%
======================================
Files 148 148
Lines 2568 2568
======================================
Hits 2563 2563
Misses 5 5 Continue to review full report at Codecov.
|
focus
method to typingsfocus
method to typings
Released in |
This change completely breaks the component.
If I add
If you look at the class Component<P, S> {
constructor(props?: P, context?: any);
setState<K extends keyof S>(f: (prevState: S, props: P) => Pick<S, K>, callback?: () => any): void;
setState<K extends keyof S>(state: Pick<S, K>, callback?: () => any): void;
forceUpdate(callBack?: () => any): void;
render(): JSX.Element | null | false;
// etc. I've managed to fix it by changing the declaration to the following: declare class TextArea extends React.Component<TextAreaProps, {}> {
focus: () => void;
} It looks like |
I've created a pull request to fix the issue. Please find a link to it above this comment. |
Fixes #1970.