[base-ui][material-ui][TextareaAutosize] Fix inline style not getting applied#41369
Conversation
Netlify deploy previewhttps://deploy-preview-41369--material-ui.netlify.app/ Bundle size reportDetails of bundle changes (Toolpad) |
DiegoAndai
left a comment
There was a problem hiding this comment.
Hey @ZeeshanTamboli, I have a single suggestion.
|
We recently committed to only move forward from Base UI repository https://github.com/mui/base-ui so this PR isn't solving the problem. I transferred the issue to Base UI mui/base-ui#168. It's great that we didn't close it, the problem is not truly fixed yet 👍. Next, we still need to:
|
| const { container } = render(<TextareaAutosize style={{ backgroundColor: 'yellow' }} />); | ||
| const input = container.querySelector<HTMLTextAreaElement>('textarea')!; |
There was a problem hiding this comment.
Prefer using the screen. We are moving tests as much as possible to rely on global queries. This is purely to keep the test environment simple. Most of the time, we don't need the notion of a container. We render one element at once on the screen.
| const { container } = render(<TextareaAutosize style={{ backgroundColor: 'yellow' }} />); | |
| const input = container.querySelector<HTMLTextAreaElement>('textarea')!; | |
| render(<TextareaAutosize style={{ backgroundColor: 'yellow' }} />); | |
| const input = document.querySelector<HTMLTextAreaElement>('textarea')!; |
@oliviertassinari Noted. However, addressing all of this will require some time, correct? Given that this was a regression, it was crucial to implement an urgent fix in this repository for the upcoming release. Nevertheless, I agree that the fix should also be applied in the Base UI repository - mui/base-ui#177. |
Fix part of mui/base-ui#168 where style was not getting applied. It's a regression from #40789.
Before: https://codesandbox.io/p/sandbox/magical-fermi-nctqps
After: https://codesandbox.io/p/sandbox/compassionate-napier-7tnq6l