fix: propagate textDidChangeNotification
and editingChanged
events further
#305
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Right now if I add another listener for
editingChanged
event -> I'll not get any updates.It happens because of problem described here (a particular issue with discussion was in RedMadRobot/input-mask-ios#12 but it's in Russian language).
In general author of
input-mask-ios
suggest to add a custom delegate withonEditingChanged
callback. However for 3rd party libraries (such as react-native-keyboard-controller it could be a problematic approach, because I need to set a callback totextField
delegate - but for that I need to know the interface/protocol of this delegate, and I can not import this protocol fromreact-native-text-input-mask
- in order to do this I need to make a dependency onreact-native-text-input-mask
in Podfile, but it should be optional dependency and I feel like it makes an approach very complicated without explicit benefits).So I went with an approach where we directly re-send events 👀
Feel free to suggest other alternatives if you have them!
Also for reference I'm attaching an original PR with fix from
react-native-keyboard-controller
: kirillzyusko/react-native-keyboard-controller#341