kirillzyusko / react-native-keyboard-controller

Keyboard manager which works in identical way on both iOS and Android
https://kirillzyusko.github.io/react-native-keyboard-controller/
MIT License
1.77k stars 81 forks source link

fix: allow to pass additional params to `.dismiss()` unintentionally #685

Closed kirillzyusko closed 1 week ago

kirillzyusko commented 1 week ago

📜 Description

Allow to pass additional params to KeyboardController.dismiss() method unintentionally.

💡 Motivation and Context

When we pass params unintentionally like onPress={KeyboardController.dismiss} then we will try to serialize big JS object to the native side, which eventually crash the application.

To avoid this I decided to wrap dismiss in additional function and always send empty params to a native function.

Closes https://github.com/kirillzyusko/react-native-keyboard-controller/issues/684

📢 Changelog

JS

🤔 How Has This Been Tested?

Tested on CI.

📝 Checklist

github-actions[bot] commented 1 week ago

📊 Package size report

Current size Target Size Difference
159566 bytes 159580 bytes -14 bytes 📉