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: Wrong onHide signature #769

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Cosmin-Madalin
Copy link

Fixing: #735

This change does not introduce new behaviour or functionality but simply corrects the TypeScript definition to align with existing behaviour.

Previously, the onHide prop's TypeScript definition accepted a single Date parameter, representing the selected date when the modal is dismissed. However, the actual implementation passes two parameters: a boolean indicating whether the Confirm button was pressed, and a Date object if the Confirm button was pressed. The updated TypeScript definition now accurately reflects this functionality.

Test Plan

Confirm Button Press:

  • Open the date-time picker.
  • Select a date and press the Confirm button.
  • Ensure that onHide is called with didPressConfirm set to true and currentDate reflecting the selected date.

Cancel Button Press:

  • Open the date-time picker.
  • Press the Cancel button without selecting a date.
  • Ensure that onHide is called with didPressConfirm set to false, and currentDate is undefined.

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

Successfully merging this pull request may close these issues.

2 participants