Skip to content

Conversation

@vonovak
Copy link
Member

@vonovak vonovak commented Nov 15, 2020

Summary

this replaces #326 because the author did not allow to push into his branch

I figured it was easier to do this separately than by reviews

original description:

This commit makes the behavior of the android datetimepickers more in
line with other controlled components in react, where unmounting the
component actually dismisses the ui widget as well.

I also think it might be useful to have a way to dismiss android dialogs from JS and this will expose that possibility. The api will be documented later after we change the api of the android picker to an imperative one, as outlined in #327 (comment)

Test Plan

run demo app, click the "Show and dismiss picker!" button

What's required for testing (prerequisites)?

What are the steps to reproduce (after prerequisites)?

Compatibility

OS Implemented
iOS
Android

Checklist

  • I have tested this on a device and a simulator
  • I added the documentation in README.md
  • I updated the typed files (TS and Flow)
  • I added a sample use of the API in the example project (example/App.js)
  • I have added automated tests, either in JS or e2e tests, as applicable

aleksanb and others added 5 commits November 4, 2020 13:24
This commit makes the behavior of the android datetimepickers more in
line with other controlled components in react, where unmounting the
component actually dismisses the ui widget as well.

Co-authored-by: Stian Jensen <me@stianj.com>
@vonovak vonovak requested a review from luancurti November 16, 2020 12:36
@luancurti
Copy link
Member

luancurti commented Nov 16, 2020

@vonovak I think we can add docs for dismiss method in the readme. WDYT?

@vonovak
Copy link
Member Author

vonovak commented Nov 17, 2020

@luancurti in order to expose that as the public api, we'd need to expose a bunch of other things as well, and I think it'll be better to leave that for another PR.

Copy link
Member

@luancurti luancurti left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@luancurti luancurti merged commit 62abaff into master Nov 17, 2020
@luancurti luancurti deleted the dismiss-datepicker branch November 17, 2020 13:26
vonovak pushed a commit that referenced this pull request Nov 17, 2020
## [3.0.5](v3.0.4...v3.0.5) (2020-11-17)

### Bug Fixes

* dismiss android datepicker dialog upon unmount ([#337](#337)) ([62abaff](62abaff))
@vonovak
Copy link
Member Author

vonovak commented Nov 17, 2020

🎉 This PR is included in version 3.0.5 🎉

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants