|
@@ -14,6 +14,7 @@ class ModalScreen extends Component {
|
14
|
14
|
this.onClickShowModal = this.onClickShowModal.bind(this);
|
15
|
15
|
this.onClickDismissModal = this.onClickDismissModal.bind(this);
|
16
|
16
|
this.onClickDismissPreviousModal = this.onClickDismissPreviousModal.bind(this);
|
|
17
|
+ this.onClickDismissUnknownModal = this.onClickDismissUnknownModal.bind(this);
|
17
|
18
|
}
|
18
|
19
|
render() {
|
19
|
20
|
return (
|
|
@@ -22,8 +23,10 @@ class ModalScreen extends Component {
|
22
|
23
|
<Text style={styles.footer}>{`Modal Stack Position: ${this.getModalPosition()}`}</Text>
|
23
|
24
|
<Button title="Show Modal" onPress={this.onClickShowModal} />
|
24
|
25
|
<Button title="Dismiss Modal" onPress={this.onClickDismissModal} />
|
|
26
|
+ <Button title="Dismiss Unknown Modal" onPress={this.onClickDismissUnknownModal} />
|
25
|
27
|
{this.props.previousModalId ? (<Button title="Dismiss Previous Modal" onPress={this.onClickDismissPreviousModal} />) : undefined}
|
26
|
28
|
<Text style={styles.footer}>{`this.props.id = ${this.props.id}`}</Text>
|
|
29
|
+
|
27
|
30
|
</View>
|
28
|
31
|
);
|
29
|
32
|
}
|
|
@@ -45,6 +48,9 @@ class ModalScreen extends Component {
|
45
|
48
|
onClickDismissPreviousModal() {
|
46
|
49
|
Navigation.dismissModal(this.props.previousModalId);
|
47
|
50
|
}
|
|
51
|
+ onClickDismissUnknownModal() {
|
|
52
|
+ Navigation.dismissModal('unknown');
|
|
53
|
+ }
|
48
|
54
|
|
49
|
55
|
getModalPosition() {
|
50
|
56
|
return (this.props.modalPosition || 1);
|