Closed kirillzyusko closed 2 months ago
Current size | Target Size | Difference |
---|---|---|
128786 bytes | 127406 bytes | 1380 bytes 📈 |
PR Preview Action v1.4.7
:---:
:rocket: Deployed preview to https://kirillzyusko.github.io/react-native-keyboard-controller/pr-preview/pr-419/
on branch gh-pages
at 2024-04-26 21:59 UTC
The latest updates on your projects. Learn more about Argos notifications ↗︎
Build | Status | Details | Updated (UTC) |
---|---|---|---|
default (Inspect) | ✅ No change detected | - | Apr 26, 2024, 10:00 PM |
📜 Description
Added
onDoneCallback
/onNextCallback
/onPrevCallback
functions toKeyboardToolbar
.💡 Motivation and Context
It's often needed to customize behavior when buttons are pressed, for example do a haptic feedback or even play a sound.
Before this PR it wasn't possible to add an action that will be called whenever user presses a particular button along with the default action. But in this PR I added it.
Initially I wanted to provide
onNextPress
functions that would redefine an entire handler. But in this case users will have to go into source code and understand howKeyboardToolbar
works under the hood. Even though it's not difficult it's better to keep such things internally (and in most cases users will rely on defult behavior - in case if we need to re-define a behavior I'll add new functions later).📢 Changelog
Docs
onDoneCallback
/onNextCallback
/onPrevCallback
callbacks;JS
onDoneCallback
/onNextCallback
/onPrevCallback
;🤔 How Has This Been Tested?
Tested on Pixel 7 Pro (android 14) and iPhone 11 (iOS 17.4).
📸 Screenshots (if appropriate):
There is no way to test haptic visually 😀
📝 Checklist