How to use the react-native-navigation.Navigation.dismissModal function in react-native-navigation

To help you get started, we’ve selected a few react-native-navigation examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github demokratie-live / democracy-client / src / screens / VoteList / Filter / index.js View on Github external
break;
      }
      Alert.alert(
        `Speichern war nicht möglich – wähle mindestens ${indefiniteArticle} ${filterTitle} aus`,
      );
      return false;
    }

    const jsonString = JSON.stringify(this.state.data);
    await AsyncStorage.setItem(STORAGE_KEY, jsonString);
    this.props.setFilters({
      variables: { filters: jsonString },
      refetchQueries: [{ query: GET_FILTERS }],
    });

    Navigation.dismissModal({
      animationType: 'slide-down', // 'none' / 'slide-down' , dismiss animation for the modal (optional, default 'slide-down')
    });
    return true;
  };
github oktadeveloper / okta-react-native-spring-boot-example / react-native-app / App / modules / login / login-screen.js View on Github external
componentWillReceiveProps (newProps) {
    // Did the login attempt complete?
    if (!newProps.fetching) {
      if (newProps.error) {
        if (newProps.error === 'WRONG') {
          Alert.alert('Error', 'Invalid login', [{text: 'OK'}])
        }
      } else if (newProps.account) {
        Navigation.dismissModal(this.props.componentId)
      }
    }
  }
github birkir / hekla / src / screens / reply / Reply.tsx View on Github external
dismiss() {
    Keyboard.dismiss();
    Navigation.dismissModal(this.props.componentId);
  }
github forest-watcher / forest-watcher / app / components / form / answers.js View on Github external
navigationButtonPressed({ buttonId }) {
    if (buttonId === 'upload') {
      if (!this.props.isConnected) {
        this.props.showNotConnectedNotification();
        return;
      }

      const { reportName, uploadReport, componentId } = this.props;
      uploadReport(reportName);
      Navigation.dismissModal(componentId);
    }

    if (buttonId === 'backButton') {
      Navigation.dismissModal(this.props.componentId);
    }
  }
github wix / react-native-navigation / playground / src / screens / TextScreen.js View on Github external
onClickDismissModal = () => {
    Navigation.dismissModal(this.props.componentId);
  }
github forest-watcher / forest-watcher / app / components / form / withDraft.js View on Github external
onPress: () => {
              if (saveReport) {
                saveReport(reportName, {
                  status: CONSTANTS.status.draft
                });
              }
              tracker.trackReportFlowEndedEvent(REPORT_OUTCOME_SAVED);
              Navigation.dismissModal(componentId);
            }
          }
github rainbow-me / rainbow / src / screens / DemoTransactionScreen.js View on Github external
onClose() {
    StatusBar.setBarStyle('dark-content', true);
    Navigation.dismissModal({
      animationType: 'slide-down',
    });
  }
  render() {
github jinshin1013 / rnn-boilerplate / src / flows / ExampleModal / index.tsx View on Github external
      <button title="Close modal"> Navigation.dismissModal(componentId)} /&gt;
    </button>