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

[BUG]: useLiveQuery is not re-triggered #3931

Open
1 task done
catalinmiron opened this issue Jan 10, 2025 · 0 comments
Open
1 task done

[BUG]: useLiveQuery is not re-triggered #3931

catalinmiron opened this issue Jan 10, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@catalinmiron
Copy link

Report hasn't been filed before.

  • I have verified that the bug I'm about to report hasn't been filed before.

What version of drizzle-orm are you using?

0.38.3

What version of drizzle-kit are you using?

0.29.1

Other packages

No response

Describe the Bug

I am building an application with expo-sqlite and I have a special usecase, I am using the Apple.sharedContainer to have access to the SQLite db (shared db across targets) - React-Native and Swift side as well.

My usecase is the following:

  • A user can create a widget that will have a Button with an Intent of changing the data from the SQLite -> this is working seamlessly without issues
  • The user can than open the application and the data is not updated.
    If I refresh the application and re-trigger the useLiveQuery the data comes back and it's fresh.

I am not sure if this is a bug, but it would be great to have a mechanism that will retrigger the select when the component is focused or to have a method exposed to refetch | retrigger when AppState or something else have changed (Pull-to-refresh for example).

I believe this is happening because the app is placed in the background and it is receiving changes while in background so it can't update the UI.

@catalinmiron catalinmiron added the bug Something isn't working label Jan 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant