material-components-web-react
material-components-web-react copied to clipboard
All components with events should follow the controlled component pattern
Similar to text-field, all components with events should follow the controlled component pattern. This gives the developer more control over the state of the component. This should also simplify some of the component's logic surrounding events.
- [ ] checkbox
- [ ] dialog
- [ ] chips
- [ ] IconButton
- [ ] drawer
related #772
drawer too, right?
@lucascdb drawer too yes!
@lucasecdb drawer actually follows the controlled component pattern.
it has the API for a controlled component, but it doesn't "respect" it. like, if I don't do anything on the onClose
callback, the drawer will close anyway, even though the open
prop is still set to true
.
You are right...I checked dismissible, but only removed the open
prop. Adding it back. Thanks
Are there plans to support the controlled components pattern for Menu
(or MenuSurface
) as well?