External usage of function "onCancel"
See original GitHub issueHi,
My app activity depends on connection status. I tried to hide DateTimePicker when it is disconnected but it doesn’t seem to work (when I put the code to render
, picker is still visible, app ends up with infinite loop and crashes after while):
if (this.props.connectionStatus === config.connectionStatus.DISCONNECTED) {
this._hideDateTimePicker;
}
So my other idea is to programmatically use onCancel
function so it could be triggered when app state changes. Something like:
if (this.props.connectionStatus === config.connectionStatus.DISCONNECTED) {
this."functionThatUsesOnClose"();
}
Is there any way to do that? Thank you in advance for reply!
Issue Analytics
- State:
- Created 5 years ago
- Comments:10 (5 by maintainers)
Top Results From Across the Web
JavaScript Events Handlers— onfocus, oncancel, and ...
The onfocus property of the document object lets us set an event handler for the focus event. We can use it to check...
Read more >How can I pass an argument to onCancel from {...bind} using ...
So, I thought to remove onClick={() => start(preset)} from the button and call start(preset) from shortPress function. But how can I pass the ......
Read more >Server-Side Design - Win32 apps - Microsoft Learn
Server-side functions communicate with the client wizard through the windows.external object. Server-side script provides these functions to ...
Read more >How to use the react-fela.withTheme function in react-fela | Snyk
withTheme examples, based on popular ways it is used in public projects. ... rightButtons, className, subtitle, onClose, onCancel, okText, cancelText, onOk, ...
Read more >suspendCancellableCoroutine - Kotlin
A typical use of this function is to suspend a coroutine while waiting for a ... an external API must be thread-safe, because...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Not good 😭 I’ll request them then. Thank you for your reply!
Ouch, you’re in a bad luck then.
The Android DatePicker and TimePicker don’t have a programmatic “hide” support (so we can’t do much here 😞 ).
I guess you could try making a feature request directly to the React Native repo.
(Sorry if I didn’t understand your issue before)