react-native-batch-push icon indicating copy to clipboard operation
react-native-batch-push copied to clipboard

UserEditor not working as expected

Open jakobereksen opened this issue 7 years ago • 2 comments

const editor = new BatchUserEditor(); 
editor.setIdentifier('some_identifier');
editor.save();

seems not add an setIdentfifier action in the js implementation, so when editor.save(); is called, no action is passed to the native implementation. When the editor is initialized like this though:

const editor = new BatchUserEditor([
  {
    type: 'setIdentifier',
    value: 'some_identifier'
  }
]);
editor.save();

The identifier is set as expected.

jakobereksen avatar Aug 14 '19 12:08 jakobereksen

Hello,

Could you try chaining the calls?

https://github.com/bamlab/react-native-batch-push/blob/master/src/BatchUserEditor.ts#L86 shows that you should either chain the calls, or reassign editor on each call.

abarisain avatar Aug 14 '19 12:08 abarisain

Thank you, you are right.

jakobereksen avatar Aug 16 '19 12:08 jakobereksen