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

Return value from dialog #3235

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

jwelmac
Copy link
Contributor

@jwelmac jwelmac commented Oct 8, 2024

Previous usage of Get.dialog allowed closing of the dialog using Get.back with an optional result. With the redesigned Get.dialog implementation Get.back will no longer close the dialog or return a value. Instead to close a dialog Get.closeOverlay or Get.backLegacy has to be used.

This PR introduces the ability to return a value when closing a dialog with Get.closeOverlay and introduces an alias method Get.closeDialog.

Solves #3122

Pre-launch Checklist

  • I updated/added relevant documentation (doc comments with ///).
  • I added new tests to check the change I am making or feature I am adding, or @jonataslaw said the PR is test-exempt.
  • All existing and new tests are passing.

@jonataslaw
Copy link
Owner

Thanks for that!
My only concern is with the alias, it closes bottomsheets too.
But adding the result on pop looks nice!

@jwelmac
Copy link
Contributor Author

jwelmac commented Oct 8, 2024

Good catch.

I will add a line to limit it to dialogs only.

@chenjiangmin
Copy link

When will we merge this request

@jwelmac
Copy link
Contributor Author

jwelmac commented Nov 15, 2024

@jonataslaw
Any idea how soon this PR can be merged?

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.

3 participants