question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

onChange not called on ios

See original GitHub issue

hi,

the onchange callback is never called on my system (ios). it works perfectly on android.

using version 1.0.0

thanks, dan

return (<ModalSelector style={{ height: 1, width: 1, position: 'absolute', borderWidth: 1, borderColor: 'red' }}
                             visible={this.state.showModal}
                             data={this.state.photoOrigins}
                             onChange={() => {
                                         alert('asdasd'); // THIS ONE IS NOT CALLED
                                       }}
                             onModalClose={() => {
                                             this.setState({
                                               showModal: false
                                             })
                                           }} />)

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:23 (11 by maintainers)

github_iconTop GitHub Comments

1reaction
Grarencommented, Feb 18, 2019

Hi, I’d like to report the same as the other guys, onChange is not firing on IOS running on React 16.3.1 and react-native 0.55.4 (No expo).

I had not specified closeOnChange so it defaults to true, I guess onDismiss is not getting called, or the changedItem is undefined by the time it get’s called

0reactions
peacechencommented, Mar 10, 2020

Thanks for the PR @jacobkring

Published in v2.0.0

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why onchange function not working in safari
If you change onchange to onblur it works for iOS but not others. The fix I eventually came to was to use BOTH...
Read more >
onChange with ScenePhase not work…
In Xcode 12 beta 4, running my app on the iPhone simulator, I don't get an .active change for initial launch in either...
Read more >
onChange not working with custom React TextField ...
I've attempted a number of different approaches - none of which seem to work. My best guess is that though the onChange property...
Read more >
Responding to state changes using onChange()
What all this means is that you can do whatever you want inside the onChange() function: you can call methods, run an algorithm...
Read more >
[Solved]-SwiftUI - onChange not getting called
Related Posts · cocos2d OpenGL error 0x0502 in -[EAGLView swapBuffers] · Expedited review - send again or not? · Modify the BLE device...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found