Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: missing onScroll event in KeyboardAwareScrollView #408

Merged
merged 3 commits into from
Apr 5, 2024

Conversation

kirillzyusko
Copy link
Owner

@kirillzyusko kirillzyusko commented Apr 4, 2024

📜 Description

Fixed firing of onScroll in KeyboardAwareScrollView

💡 Motivation and Context

Initially it was fixed in #339 and I'm sure it was working 😅

However it looks like in current setup (RN 0.73, REA 3.8.0) such way is not working and onScroll property still gets ignored 😔

So in this PR I followed a different path: initially I wanted to fire this handler via runOnJS, but we can not follow a full signature of the method, since REA has only nativeEvent property (and indeed in this case some properties would be simply missing).

The different path was to update a shared value from JS thread and call a callback as usually - it fixes a problem in old code and in a new, so for now this approach looks decent 👍

Let's see how it works in a wild life 👀

Also in this PR I'm changing content of tea.yaml - it should be done in separate PR, but I don't want to open another PR just to fix quotes, so decided to merge everything in a single one 🙈

Closes #337

📢 Changelog

JS

  • fire onScroll in callback;
  • react on scroll position change in JS thread.

FS (file system)

  • added single quotes ' for tea.yaml;

🤔 How Has This Been Tested?

Tested manually on iPhone 15 Pro.

📸 Screenshots (if appropriate):

image

📝 Checklist

  • CI successfully passed
  • I added new mocks and corresponding unit-tests if library API was changed

@kirillzyusko kirillzyusko added 🐛 bug Something isn't working 📚 components Anything related to the exported components of this library labels Apr 4, 2024
@kirillzyusko kirillzyusko self-assigned this Apr 4, 2024
Copy link
Contributor

github-actions bot commented Apr 4, 2024

📊 Package size report

Current size Target Size Difference
130698 bytes 130819 bytes -121 bytes 📉

@kirillzyusko kirillzyusko merged commit e0a6c09 into main Apr 5, 2024
6 checks passed
@kirillzyusko kirillzyusko deleted the fix/missing-on-scroll-event branch April 5, 2024 10:32
@kirillzyusko kirillzyusko added the KeyboardAwareScrollView 📜 Anything related to KeyboardAwareScrollView component label May 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working 📚 components Anything related to the exported components of this library KeyboardAwareScrollView 📜 Anything related to KeyboardAwareScrollView component
Projects
None yet
Development

Successfully merging this pull request may close these issues.

onScroll on KeyboardAwareScrollView is not fired
1 participant