Closed lwolle closed 5 years ago
There are two issues:
extends
, &
or |
. We will have to revert that change.innerRef
. I might be able to submit a fix upstream.I'm cautioning anyone who is wrapping styled-components that the innerRef
is not actually forwarded correctly. This might cause deprecation warnings for anyone using react 16.6 in strict mode. This is as much of a problem with our implementation as with theirs.
Temporary workaround (not applicable to TextField
just yet):
```ts
import * as React from 'react';
import { render } from 'react-dom';
import styled from 'styled-components';
import Button, {
ButtonProps as MuiButtonProps
} from '@material-ui/core/Button';
type Omit
Turns out the innerRef
API is removed in v4 anyway. The typings for v3 are now located over at DefinitelyTyped and I couldn't reproduce the issue with their tests.
I recommend that you upgrade to styled-components v4 which should not cause these issues. I don't have the time to fix older versions of styled-components. Feel free to open an issue at DefinitelyTyped or even better a PR.
@eps1lon Thanks for looking into it. We'll update our dependencies and 🤞 !
Thanks you all contributors for your excellent work on this library. "We" really appreciate your work. Unfortunately, we encountered an issue when using material-ui, with TypeScript and StyledComponents. Nevertheless, this is of course not diminishing our appreciation of your contributions, time and efforts.
Expected Behavior
Current Behavior
Steps to Reproduce
Link: https://codesandbox.io/s/7mnr2lwp3q
Context
We are using material-ui, TypeScript and StyledComponents wihtin our application. Wrapping the TextField in a wrapper component, like shown in the codesandbox is unfortunately not to realizable. The same procedure is fully functional for usage of the checkbox in agreement with the excellent material-ui docs
Your Environment