Giter Club home page Giter Club logo

Comments (7)

pfeiffer avatar pfeiffer commented on May 20, 2024 2

I'm seeing this as well with:

dialog.set({
  itemsCallback: () => { },
  dismissListener: () => {  },
});

from react-native-dialogs.

vunguyentuan avatar vunguyentuan commented on May 20, 2024 2

I'm getting the same issue, any update on this?

from react-native-dialogs.

QuantumKing avatar QuantumKing commented on May 20, 2024 1

Fixed it by putting the onPositive code inside the input callback. Issue arrises because the native module's callback is being invoked multiple times.

from react-native-dialogs.

rodrigoxavier avatar rodrigoxavier commented on May 20, 2024

The @QuantumKing answer solve to me. Thank you!
My function is the following and it's working perfectly:

   var options = {
      title: I18n.t('observation').toUpperCase(),
      content: I18n.t('observation_desc'),
      positiveText: I18n.t('ok'),
      negativeText: I18n.t('cancel'),
      input: {
        allowEmptyInput: false,
        callback: (text) => {
          this.props.editContactObservation(text, contact, this.props.user.uid)
        },
      }
    };

      const dialog = new DialogAndroid();
      dialog.set(options);
      dialog.show();

from react-native-dialogs.

aish1550 avatar aish1550 commented on May 20, 2024

Hi, Just seen this. I'm getting this too. Im not a JS wiz but using firebase, steup with npm firestack module and react native. Simply trying to get password reset working and for some reason getting the above error when they submit their email address. Anyone tell me what i'm doing wrong and how to fix this without speaking techie jargon?

from react-native-dialogs.

aish1550 avatar aish1550 commented on May 20, 2024

image

from react-native-dialogs.

vonovak avatar vonovak commented on May 20, 2024

closed in favor of #57

my comment: yes, callback can only be invoked once. If you'd like to have your JS function to be called multiple times, we'd need to use events. This is currently not implemented but I'd merge a PR for this if anyone is interested.

from react-native-dialogs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.