Skip to content

[FormControl] Use stable context API#13590

Merged
oliviertassinari merged 5 commits into
mui:masterfrom
eps1lon:fix/core/FormControl/stable-context
Nov 14, 2018
Merged

[FormControl] Use stable context API#13590
oliviertassinari merged 5 commits into
mui:masterfrom
eps1lon:fix/core/FormControl/stable-context

Conversation

@eps1lon

@eps1lon eps1lon commented Nov 13, 2018

Copy link
Copy Markdown
Member
  • 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

oliviertassinari commented Nov 14, 2018

Copy link
Copy Markdown
Member

@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