Skip to content
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

Merged
merged 2 commits into from
Oct 9, 2024
Merged

fix(calendar): fix minor type issues #1588

merged 2 commits into from
Oct 9, 2024

Conversation

Birkbjo
Copy link
Member

@Birkbjo Birkbjo commented Aug 28, 2024


Description

Fixes some minor type issues when working the CalendarInput.

  • Allow "label" to be passed
    This was previously omitted from types, but we are in fact spreading it as part of rest to input field - which is great.
  • Add "clearable" property.
    This was missing in types but is documented in storybook and ui docs.

@Birkbjo Birkbjo requested a review from a team as a code owner August 28, 2024 14:54
@@ -53,8 +58,7 @@ export interface CalendarProps {
export const Calendar: React.FC<CalendarProps>

export type CalendarInputProps = Omit<
InputFieldProps,
'label' | 'type' | 'value'
InputFieldProps, 'type' | 'value'
Copy link
Member Author

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.

Copy link
Member Author

@Birkbjo Birkbjo Oct 8, 2024

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.

@dhis2-bot
Copy link
Contributor

dhis2-bot commented Aug 28, 2024

🚀 Deployed on https://pr-1588--dhis2-ui.netlify.app

@dhis2-bot dhis2-bot temporarily deployed to netlify August 28, 2024 14:59 Inactive
@Birkbjo Birkbjo changed the base branch from master to alpha October 8, 2024 12:00
@dhis2-bot dhis2-bot temporarily deployed to netlify October 9, 2024 15:29 Inactive
@Birkbjo Birkbjo merged commit 21e60a6 into alpha Oct 9, 2024
16 checks passed
@Birkbjo Birkbjo deleted the fix/calendar-types branch October 9, 2024 15:39
dhis2-bot added a commit that referenced this pull request Oct 9, 2024
# [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))
@dhis2-bot
Copy link
Contributor

🎉 This PR is included in version 10.0.0-alpha.3 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants