Questions tagged [tanstack]
74 questions
1
vote
1 answer
TanStack Svelte Table Pagination
I was using TanStack Table Svelte Library and I wanted to use pagination but they haven't given any example on that, if anyone has any idea how to use the pagination on the Svelte table or if there are any methods that can help?

Gaurav
- 69
- 1
- 9
1
vote
1 answer
react: jotai, how to handle Promise inside atom()
I was following a tutorial and was using the exact same code but because of a different dependency version, I get an error.
The Tutorial dependency version:
"jotai": "^1.9.0",
"jotai-tanstack-query": "^0.4.0",
My dependency version:
"jotai":…

Yukinosuke Takada
- 323
- 1
- 9
1
vote
0 answers
Dependant Tanstack useQueries. How to chain them?
I've a functional react component like this, using Tanstack Query v4 and react 18:
const Userview = (props) => {
...
const userQueries = useQueries({
queries: props.users.map((user) => {
return {
queryKey: ['users',…

Tobi
- 73
- 8
1
vote
0 answers
How to make path not overwrite parent path from express
When the site is visited you are sent to /admin witch is right, but the content for /admin's index page does not show.
image of the start path being /admin
When I then click on the FAQ page the path should be /admin/FAQ but it is replaced with…

Hackerman_69
- 11
- 2
1
vote
1 answer
Why does the browser trigger a refetch of values in useQuery from TanStack when it is refocused?
I'm using the useQuery hook from the React Query library in my React application to fetch data from my server. However, I've noticed that whenever I switch away from the browser tab and then come back to it, the useQuery hook triggers a refetch of…

Sergey Karlinsky
- 48
- 6
1
vote
1 answer
useEffect not updating dependency with queryClient.getQueryData in React Query
I am putting queryClient.getQueryData in dependency of useEffect hook to observer when data updating to cache but the useEffect never trigger update. What is the problem here?
My code below:
...
const queryClient = useQueryClient();
const queryKey…

Epple
- 640
- 14
1
vote
0 answers
react pagination using tanstack react query, buttons are not working
I am using jsonplaceholder api and trying to fetch results on different pages, for that I am
using tanstack react query, however my buttons seem to not work? Can somebody please guide me in
the right direction?
I am having a page hook and on…

web_dev
- 11
- 3
1
vote
1 answer
Next.js fetched data comes in, but I can't get it to display on the page
I can get the data to show up in a console.log from the first file, where it is being grabbed by axios, but can't get it to display in my tanstack table or just as a string inside the HTML. I have tested my tanstack table with hardcoded data and it…

Byverone
- 46
- 6
1
vote
2 answers
How to use React Query data in a layout component?
I have a Next.js application where I use @tanstack/react-query@4 for state management and data fetching. I use it for authentication state via a custom useUser() hook that is used throughout the app, including in a nav bar component shared across…

Iftach
- 95
- 2
- 13
1
vote
1 answer
How to update displayed data with React Query without constantly sending mutations?
I recently started using React Query to manage my data fetching and caching, but I'm having trouble figuring out how to update displayed data without constantly sending mutations.
For example, let's say I have a query at the top of my component to…

AnonymZ
- 78
- 1
- 11
1
vote
0 answers
How to set exact width of columns in react-table version 8 which will not change in any condition
I'm using a table with an expand option while working on a react table. With react table version 7, which I used to make this table, I was able to adjust the width of each table column using the width property and the useBlockLayout hook. Now I'm…

any post
- 87
- 10
1
vote
0 answers
Svelte tanstack table pagination?
I'm trying to make the table pagination in svelte to work but for some reason i'm getting a safeUpdater function instead of PaginationState (which is what i expected). How do i keep track of the latest pageIndex if i couldn't get the proper result…

Joimee Cajandab
- 173
- 15
0
votes
1 answer
tanstack table rendering image along name
I am using TanStack table in nextJS (react).
I want to have this behavior:
but in the tutorial it says
const columns = React.useMemo(() => [
{
Header: "Name",
accessor: "name",
Cell: AvatarCell,
imgAccessor: "imgUrl",
…

steve123
- 31
- 3
0
votes
0 answers
I am using Tanstack table in ReactJS (useReactTable), I want to first set column filters then apply them instead of applying one by one
I have multiple column filters. and I am applying filters using .getColumn("team").setFilterValue(team) .getColumn("user").setFilterValue(team).
But it will re-render the table 2 times. I want to render the table one…
0
votes
0 answers
I have installed react in my laravel project. I want use tanstack to render a react table
The data is coming from api.php file as json through useEffect. How do I display this data in the table?
Here is my current code:
import React,{ useEffect, useState, useMemo } from 'react';
import {
flexRender,
getCoreRowModel,
…

Olamide Abass
- 1
- 1