-
Notifications
You must be signed in to change notification settings - Fork 15
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
fix(calendar): fix minor type issues #1588
Conversation
components/calendar/types/index.d.ts
Outdated
@@ -53,8 +58,7 @@ export interface CalendarProps { | |||
export const Calendar: React.FC<CalendarProps> | |||
|
|||
export type CalendarInputProps = Omit< | |||
InputFieldProps, | |||
'label' | 'type' | 'value' | |||
InputFieldProps, 'type' | 'value' |
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.
onFocus
should technically be omitted because it's overridden, see https://github.com/dhis2/ui/blob/master/components/calendar/src/calendar-input/calendar-input.js#L76 . We should either omit from props here or call it in internal onFocus
.
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 think we should call props.onFocus?.()
, follow up in another PR.
🚀 Deployed on https://pr-1588--dhis2-ui.netlify.app |
07944b8
to
c310fbc
Compare
# [10.0.0-alpha.3](v10.0.0-alpha.2...v10.0.0-alpha.3) (2024-10-09) ### Bug Fixes * **calendar:** fix minor type issues ([#1588](#1588)) ([21e60a6](21e60a6))
Description
Fixes some minor type issues when working the
CalendarInput
.This was previously omitted from types, but we are in fact spreading it as part of rest to input field - which is great.
This was missing in types but is documented in storybook and ui docs.