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(react-query): reorder query function declarations #7260

Merged
merged 3 commits into from
Apr 11, 2024

Conversation

ienrum
Copy link
Contributor

@ienrum ienrum commented Apr 10, 2024

When I use the useQuery hook and provide it with initialData, the autocomplete feature doesn't work.

I believe the issue arises from undefinedOptions having a broader type compared to definedOptions. Therefore, if a function prioritizes declaring options as undefined over defined options, the inference won't occur properly until the completion of the word.

before

no autocomplete

after

yes autocomplete

Copy link

vercel bot commented Apr 10, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
query ⬜️ Ignored (Inspect) Visit Preview Apr 11, 2024 9:13am

Copy link

nx-cloud bot commented Apr 11, 2024

☁️ Nx Cloud Report

CI is running/has finished running commands for commit 02eb927. As they complete they will appear below. Click to see the status, the terminal output, and the build insights.

📂 See all runs for this CI Pipeline Execution


✅ Successfully ran 1 target

Sent with 💌 from NxCloud.

Copy link

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 02eb927:

Sandbox Source
@tanstack/query-example-angular-basic Configuration
@tanstack/query-example-react-basic-typescript Configuration
@tanstack/query-example-solid-basic-typescript Configuration
@tanstack/query-example-svelte-basic Configuration
@tanstack/query-example-vue-basic Configuration

@TkDodo TkDodo merged commit 03048e3 into TanStack:main Apr 11, 2024
6 checks passed
@TkDodo TkDodo linked an issue Apr 11, 2024 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

The auto-complete feature on useQuery did not work as expected
2 participants