Closed kirillzyusko closed 2 months ago
Current size | Target Size | Difference |
---|---|---|
135975 bytes | 136026 bytes | -51 bytes š |
PR Preview Action v1.4.7
:---:
:rocket: Deployed preview to https://kirillzyusko.github.io/react-native-keyboard-controller/pr-preview/pr-435/
on branch gh-pages
at 2024-05-10 09:09 UTC
The latest updates on your projects. Learn more about Argos notifications āļø
Build | Status | Details | Updated (UTC) |
---|---|---|---|
default (Inspect) | ā No change detected | - | May 10, 2024, 5:07 PM |
š Description
Consume
onChangeText
from delegate level.š” Motivation and Context
To make some of functionality properly working in reach RN ecosystem you had to apply patch to
react-native-text-input-mask
.However it makes it complicated in terms of setup so I always thought on how to improve it. In https://github.com/kirillzyusko/react-native-keyboard-controller/pull/426 we started to inject our delegate to intercept some
TextInput
events. So now we can intercept necessary events without event-bus subscription (we can take them directly from the delegate).In this PR I re-worked this part (removed
TextInputObserver
class) and started to use delegate for these purposes. Also I've discovered again that we may substitute back delegate and then substitute our own again (when user typed first letter) - it's not critical but it doesn't comply with keyboard-controller delegate paradigm - we should set delegate only once (on focus) and unset it on un-focus. So I also re-worked this part and now, when we're trying to delete our observers - we check, that we are actually move focused to another input.š¢ Changelog
Docs
useFocusedInputHandler
hook;E2E
worklet
andformatted
;iOS
š¤ How Has This Been Tested?
Tested on CI and iPhone 15 Pro manually.
šø Screenshots (if appropriate):
No visual changes.
š Checklist