content: document the correct way to close the parent modal from a child component
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 38/100
- Issue type
- Documentation
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- angular
- Domain
- documentation
Research direction
Start with the linked modal documentation and inspect core/src/components/modal/modal.tsx around the componentProps handling. Confirm whether the modal instance passed to the child is the supported way to dismiss the parent, then document the stable usage and link it from the relevant modal guidance.
Written by the indexing model from the issue text.
Description
Bug Report
Ionic version:
[x] 4.5
Current behavior:
this.modalCtrl.dismiss closes a modal instance most recently opened, not a parent one ( https://github.com/ionic-team/ionic/tree/v4.5.0/core/src/components/modal#dismissing-a-modal )
and we found the modal instance is passed in addition to componentProps
It seems that using modal instance passed through @Input or NavParams is correct way to close the parent modal.
Is this behavior stable?
Expected behavior:
If it is, this behavior should be documented.
Other information:
related StackOverflow question
Ionic info:
Ionic:
ionic (Ionic CLI) : 4.12.0
Ionic Framework : @ionic/angular 4.4.2
@angular-devkit/build-angular : 0.13.6
@angular-devkit/schematics : 7.3.6
@angular/cli : 7.3.9
@ionic/angular-toolkit : 1.4.1
Cordova:
cordova (Cordova CLI) : 8.1.2 (cordova-lib@8.1.1)
Cordova Platforms : android 8.0.0, browser 6.0.0, ios 5.0.1
Cordova Plugins : cordova-plugin-ionic 5.3.0, cordova-plugin-ionic-keyboard 2.1.3, cordova-plugin-ionic-webview 2.5.0, (and 22 other plugins)
System:
Android SDK Tools : 26.1.1 (/Users/buko106/Library/Android/sdk)
ios-deploy : 1.9.4
ios-sim : 8.0.1
NodeJS : v10.16.0 (/Users/buko106/.anyenv/envs/nodenv/versions/10.16.0/bin/node)
npm : 6.9.0
OS : macOS Mojave
Xcode : Xcode 10.2.1 Build version 10E1001
- Dominant language
- MDX
- Stars
- 621
- Forks
- 3.2k
- Avg merge
- 1d 2h
- Merged PRs (30d)
- 86
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from ionic-team/ionic-docs
-
content
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
ionic-team/ionic-docs#4705 ·
-
content package: angular
Difficulty 2/5 Half a day Newbie friendliness 78/100
ionic-team/ionic-docs#4702 ·
-
triage
Difficulty 1/5 Under an hour Newbie friendliness 80/100
ionic-team/ionic-docs#4546 ·
-
content: broken link Opencontent
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
ionic-team/ionic-docs#4381 · 2 comments ·
-
triage
Difficulty 1/5 Under an hour Newbie friendliness 72/100
ionic-team/ionic-docs#3639 ·
All issues in ionic-team/ionic-docs
Similar issues
-
documentation
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
githubnext/gh-aw-workshop#3692 ·
-
agent/guide documentation hive/hosted-available-lke648397-260827-5n31
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
-
priority-0
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
sync-en
Difficulty 1/5 1-3 hours Newbie friendliness 88/100
-
sync-en
Difficulty 1/5 1-3 hours Newbie friendliness 88/100