-
-
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] Add referenceDate
prop on TimeClock
, DigitalClock
and MultiSectionDigitalClock
#9356
[pickers] Add referenceDate
prop on TimeClock
, DigitalClock
and MultiSectionDigitalClock
#9356
Conversation
Netlify deploy previewNetlify deploy preview: https://deploy-preview-9356--material-ui-x.netlify.app/ Updated pagesNo updates. These are the results for the performance tests:
|
…ectionDigitalClock
b37c45b
to
01ea2b4
Compare
type TDate = any; | ||
|
||
interface ViewHandler<TView> { | ||
setViewValue: (utils: MuiPickersAdapter<any>, viewValue: TDate, view?: TView) => void; |
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.
I'm creating an object because I'd like to add other methods like getViewValue
(or assertViewValue
depending on the abstraction we want).
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.
LGTM!. 👌
Really nice and isolated approach to delivering the solution. 💯
packages/x-date-pickers/src/internals/hooks/usePicker/usePickerValue.types.ts
Outdated
Show resolved
Hide resolved
packages/x-date-pickers/src/MultiSectionDigitalClock/tests/MultiSectionDigitalClock.test.tsx
Show resolved
Hide resolved
referenceDate
prop on TimeClock
, DigitalClock
and MultiSectionDigitalClock
WIPreferenceDate
prop on TimeClock
, DigitalClock
and MultiSectionDigitalClock
7620ba7
to
d4570bc
Compare
Follow up on #9260
I also created a small new abstraction for view interaction in the tests because they are super hard to read and I think some consistent API would make testing a lot easier.
Next steps