-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
[pickers] Introduce a new concept of manager
#15339
[pickers] Introduce a new concept of manager
#15339
Conversation
Deploy preview: https://deploy-preview-15339--material-ui-x.netlify.app/ |
88503cb
to
bbd4fe2
Compare
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
01934b9
to
1390421
Compare
1390421
to
eda4787
Compare
f1e96db
to
8592c72
Compare
8592c72
to
f06c8ca
Compare
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome work and really neat idea for the manager! 👏 💯
The final DX result looks very enticing. 💙
* Object containing basic methods to interact with the value of the picker or field. | ||
* This property is not part of the public API and should not be used directly. | ||
*/ | ||
internal_valueManager: PickerValueManager<TValue, TError>; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: Have you considered using a Class with private properties? 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to access the properties outside of the class so I don't think that would be feasible 😬
Part of #15395
You can look at #15505 to see the benefit of this approach in a concrete use case.
In this PR
Todo after this PR
useField
to only have two parameters (manager
andprops
)useField
instead of insideuseDateField
& couseDateField
& co inDateField
& co and instead directly use the manager