Skip to content
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

[FormControl] Use stable context API #13590

Merged

Conversation

eps1lon
Copy link
Member

@eps1lon eps1lon commented Nov 13, 2018

  • move from deprecated context API to stable context API
  • add withFormControlContext HOC to be able to access context via props without major component rewrite
  • tried to move to DOM only testing whenever the test broke due to changed component tree
  • minor propTypes fix (disableUnderline was spread to native div in InputBase)

Only the styling solution remains with the deprecated context API.

Closes #13465.

@eps1lon eps1lon added the core label Nov 13, 2018
@oliviertassinari oliviertassinari force-pushed the fix/core/FormControl/stable-context branch from 35a15ec to e8aa676 Compare November 14, 2018 21:56
@oliviertassinari oliviertassinari merged commit 94609ca into mui:master Nov 14, 2018
@oliviertassinari
Copy link
Member

oliviertassinari commented Nov 14, 2018

@eps1lon Awesome job! While I hate the fact it's increasing the n° of underlying components we use for a single input, I'm confident that we will be able to drastically improve that in v4 with the usage of the React hooks 💯.

@eps1lon eps1lon deleted the fix/core/FormControl/stable-context branch November 30, 2018 08:54
@zannager zannager added the component: FormControl The React component label Mar 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: FormControl The React component
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Context Api] React 16.6.0
3 participants