akinncar/react-native-mask-text

'rawText' is cutting off empty spaces

vendramini opened this issue · 0 comments

Steps to reproduce

  1. Create a <MaskedTextInput/> without setting mask property (it's allowed, so it was supposed to behave like a regular TextInput).
  2. Type anything adding empty spaces like 'test test'.
  3. onChangeText(value, rawText) is dispatched as rawTest=testtest

Expected behaviour

rawText=test test

Actual behaviour

rawText=testtest

Environment

  • React Native version: "react-native": "0.74.3",
  • React Native platform + platform version: iOS 17.5 iPhone SE Simulator
  • Typescript version (if using typescript): "typescript": "~5.3.3"

react-native-mask-text

Version: "react-native-mask-text": "^0.14.2",

https://codesandbox.io/p/sandbox/clever-https-mfsvhv?file=%2Fsrc%2FApp.js