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.

Hide the picker while the app is running in the background / inactive

See original GitHub issue
const appState = useAppState()
const [show, setShow] = useState(false)

useEffect(() => {
  if (appState.match(/inactive|background/)) {
    setShow(false)
  }
}, [appState])

The state changes correctly, but hiding the picker is terminated when the app is going on to the background

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
adamu-saikocommented, Sep 16, 2020

There is likely a general problem with hiding a picker without clicking on the buttons (Cancel / OK)

EDIT: This multitasking may conflict with e.g. entering a PIN code

1reaction
adamu-saikocommented, Sep 21, 2020

All I had to do was put the PIN Code view in the native modal to cover the calendar, but that was my case

Read more comments on GitHub >

github_iconTop Results From Across the Web

Hide the picker while the app is running in the background ...
I am thinking about writing a pure js datepicker component. All reactions.
Read more >
Dynamically hiding view in SwiftUI - Stack Overflow
The simplest and most common way to hide a view is like the following: struct ContentView: View { @State private var showText =...
Read more >
Windows background apps and your privacy - Microsoft Support
Stop an app from running in the background · Select Start , then select Settings > Apps > Apps & features. · Scroll...
Read more >
Theme Color | Visual Studio Code Extension API
inactiveFocusBackground : List background color for the focused item when the list is inactive. An active list has keyboard focus, an inactive does...
Read more >
a free SwiftUI by Example tutorial - Hacking with Swift
The Background state is used when your app isn't currently visible, so you should cut back the amount of work you do. The...
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