Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

(Fix) DatePicker input should clear when unspecified is checked #1102

Closed
wants to merge 1 commit into from

Conversation

ODORA0
Copy link
Member

@ODORA0 ODORA0 commented Jul 31, 2024

Requirements

  • This PR has a title that briefly describes the work done including the ticket number. Ensure your PR title includes a conventional commit label (such as feat, fix, or chore, among others). See existing PR titles for inspiration.

For changes to apps

If applicable

  • My work includes tests or is validated by existing tests.
  • I have updated the esm-framework mock to reflect any API changes I have made.

Summary

This fix ensures that the date input clears correctly when the "unspecified" option is selected, addressing the issue where state changes were not properly propagated to the DatePickerInput component.

Screenshots

Screen.Recording.2024-07-31.at.15.04.49.mov

Related Issue

Other

@ODORA0 ODORA0 requested review from kajambiya and ibacher July 31, 2024 12:10
@ibacher
Copy link
Member

ibacher commented Jul 31, 2024

See #1099.

@ibacher ibacher closed this Jul 31, 2024
@gracepotma
Copy link
Contributor

gracepotma commented Aug 7, 2024

@ODORA0 I'm so sorry for your experience here with a sudden closure - it turns out the underlying cause was it seems both you and Ian were working on this without both being aware 🥴 This is the ticket and you can see Ian was assigned: https://openmrs.atlassian.net/browse/O3-3505

The other concern was about adding a React state with a component that was always driving that state and overrides the on-change function, which would mean we couldn't implement a custom on-change function, and couldn't use this control in an uncontrolled manner / outside of this particular use-cases. We were concerned about the other use cases this could break.

My process takeaway here is (A) the importance of Jira tickets (unfortunately; I too have a love/hate relationship with Jira as I think we all do 😅) and (B) we should have done a better job abiding by our Contributing Conventions. Again I'm sorry for this experience Jonathan - we plan to keep doing better together 🙏 ❤️

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

Successfully merging this pull request may close these issues.

3 participants