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

[InputBase] Fix onFilled/onEmpty being called during render #15319

Merged
merged 1 commit into from
Apr 12, 2019

Conversation

eps1lon
Copy link
Member

@eps1lon eps1lon commented Apr 11, 2019

Caught with #15317 (see 2dd5cc0 for observable fix)

The constructor is called in the render phase which means it should be "side-effect free" (non-local).

I guess this also improves the API since it's now consistent when onEmpty/onFilled is called (it was different before between controlled/uncontrolled mode).

@eps1lon eps1lon added bug 🐛 Something doesn't work component: InputBase labels Apr 11, 2019
@mui-pr-bot
Copy link

Details of bundle changes.

Comparing: 26fcc0c...0bda075

bundle parsed diff gzip diff prev parsed current parsed prev gzip current gzip
@material-ui/core -0.01% -0.00% 346,653 346,631 89,716 89,712
@material-ui/core/Paper 0.00% 0.00% 68,376 68,376 20,044 20,044
@material-ui/core/Paper.esm 0.00% 0.00% 60,735 60,735 18,787 18,787
@material-ui/core/Popper 0.00% 0.00% 34,910 34,910 11,907 11,907
@material-ui/core/styles/createMuiTheme 0.00% 0.00% 17,877 17,877 5,962 5,962
@material-ui/core/useMediaQuery 0.00% 0.00% 2,463 2,463 1,044 1,044
@material-ui/lab 0.00% 0.00% 148,063 148,063 43,905 43,905
@material-ui/styles 0.00% 0.00% 53,115 53,115 15,434 15,434
@material-ui/system 0.00% 0.00% 17,132 17,132 4,519 4,519
Button 0.00% 0.00% 88,669 88,669 26,429 26,429
Modal 0.00% 0.00% 82,696 82,696 24,793 24,793
colorManipulator 0.00% 0.00% 3,745 3,745 1,537 1,537
docs.landing 0.00% 0.00% 50,908 50,908 11,210 11,210
docs.main -0.00% -0.00% 650,066 650,044 202,370 202,366
packages/material-ui/build/umd/material-ui.production.min.js -0.01% -0.00% 295,431 295,409 82,684 82,680

Generated by 🚫 dangerJS against 0bda075

@oliviertassinari oliviertassinari merged commit e51652d into mui:next Apr 12, 2019
@eps1lon eps1lon deleted the fix/InputBase/side-effects branch April 12, 2019 08:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something doesn't work
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants