-
-
Notifications
You must be signed in to change notification settings - Fork 32.5k
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
[DateRangePicker] Fix DateRangePickerDayProps
interface
#29067
Conversation
DateRangePickerDayProps
interface
44d6435
to
5e2d816
Compare
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.
👍
@@ -41,7 +41,8 @@ export interface DateRangePickerDayClasses { | |||
|
|||
export type DateRangePickerDayClassKey = keyof DateRangePickerDayClasses; | |||
|
|||
export interface DateRangePickerDayProps<TDate> extends Omit<PickersDayProps<TDate>, 'classes'> { | |||
export interface DateRangePickerDayProps<TDate = unknown> |
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.
Looking at packages/mui-lab/src/themeAugmentation/props.d.ts
. Shouldn't it be like this instead?
export interface LabComponentsPropsList {
MuiAvatarGroup: AvatarGroupProps;
MuiCalendarPicker: CalendarPickerProps<unknown>;
MuiCalendarPickerSkeleton: CalendarPickerSkeletonProps;
MuiClockPicker: ClockPickerProps<unknown>;
MuiDatePicker: DatePickerProps;
MuiDateRangePickerDay: DateRangePickerDayProps<unknown>;
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.
If we do this MuiDateRangePickerDay: DateRangePickerDayProps<unknown>;
,
do we need to set the default value here? export interface DateRangePickerDayProps<TDate = unknown>
.
I think we only need either? Correct me if I am wrong.
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 don't think the default type is needed.
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.
Please take a look at the comment.
98dd124
to
7afa8c2
Compare
@jonathanrtuck Thanks for bringing this up! |
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.
@jonathanrtuck Thanks for your contribution!!
Fix for #28373.
Problem:
Solution:
MuiDatePicker
,MuiDateTimePicker
, etc…) of providingunknown
as a default value forTDate
.