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: cleanup modal properties on close #1048

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

Conversation

adamcikado
Copy link
Contributor

No description provided.

@rigor789
Copy link
Member

Thanks for the PR, I'll need to run some tests, at a glance, seems this would wipe the shared/global context. In fact I was looking at using provide/inject to handle this instead, to allow usage within script setup context as well as the templates. Might hold off on this PR for a bit, and explore the provide/inject route instead.

@heywhy
Copy link
Contributor

heywhy commented Jun 9, 2023

@rigor789 This is a working example of using inject/provide, commit. If we will be preferring provide/inject, I think it will be appropriate we also provide a useNavigation hook and take away all global properties.

@heywhy
Copy link
Contributor

heywhy commented Jun 19, 2023

Looking at this PR again, this implementation does work fine because one can't show multiple modals at once on mobile apps, unlike web apps.

@rigor789
Copy link
Member

rigor789 commented Jun 20, 2023

Looking at this PR again, this implementation does work fine because one can't show multiple modals at once on mobile apps, unlike web apps.

You can stack multiple modals if you use the target option (so you don't try showing a modal with a ViewController that's already presenting one), example: https://stackblitz.com/edit/nativescript-vue-nativescript-vue-dh6cyk?file=src%2Fcomponents%2FHome.vue

trim.AA6CF796-4196-44EA-947D-C6163DA08DB9.MOV
Screenrecorder-2023-06-20-12-45-46-380.mp4

@heywhy
Copy link
Contributor

heywhy commented Jun 20, 2023

Thank you for the information. I did forget there is a target option because I rarely used it😅. Provide/inject should fix this issue and it’s more appropriate here.

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

Successfully merging this pull request may close these issues.

None yet

3 participants