Questions tagged [tanstack]
74 questions
0
votes
1 answer
Show only some column in react table based on certain condtions
I have react table and a react-select element. react select has 3 options. and based on that option the data will be updated into react table.
mytable has 12 columns.
I need to display 7 column when option 1 & 2 is selected and all 12 columns when…

John V
- 1
- 2
0
votes
2 answers
Update react table row with the modal's input field data - React Table
I have a react table which will open a modal upon button click. Inside the modal there is input field and I need to update the react table row with the value of input field on 'save' button click which is also inside the modal. How do I achieve…

John V
- 1
- 2
0
votes
1 answer
Optimistic update mutation with tRPC, React-query causing flashing updates
I'm currently implementing optimistic updates with the tRPC useMutation React-Query hook and it appears to be functioning properly. However, I'm encountering an issue where, upon updating the data, the response updates quickly with the new list but…

John John
- 1,305
- 2
- 16
- 37
0
votes
0 answers
preserve offset when navigating back to @tanstack query (sveltekit)
I have a tanstack query that displays drinks, and each drink is a link to a route that provides more information for the drink. The crappy part about adding tanstack is, when you navigate away from the page, going back to the page resets the query…

Joel Hager
- 2,990
- 3
- 15
- 44
0
votes
1 answer
How to pass direction to the query function when implementing bi-directional infinite list with React Query?
I'm implementing a bi-directional infinite list using useInfiniteQuery from React Query, based on the docs. The only parameter that gets passed to the queryFn is an object containing the page parameter (one of the two cursors).
It's not quite clear…

asliwinski
- 1,662
- 3
- 21
- 38
0
votes
0 answers
Issue with type definition on react-query response: Property 'x' does not exist on type
so I am new to react-query and Tansack, and I am having an issue trying to type the response, I am currently using Next.js. If I console log my reponse I get the following object, so apparently work:
{
"data": {
"articleCollection": {
…

druj_nasu
- 131
- 8
0
votes
0 answers
ReactQuery useInfiniteQuery is only returning the first page of data
I'm converting some code to use TanStack ReactQuery useInfiniteQuery hook.
Everything is working, EXCEPT when loading new data, instead of the next page's results the 1st page's data gets duplicated.
Calling the fetchNextPage method triggers a…

Dave
- 7,552
- 4
- 22
- 26
0
votes
0 answers
TanStack Table with Nuxt3, Cell Formatting
I want to use TanStack table with Nuxt3.
I have tried Cell Formatting with the following link.
https://tanstack.com/table/v8/docs/guide/column-defs
columnHelper.accessor('firstName', {
cell: props =>…

roudai
- 1
0
votes
0 answers
What Tanstack testing API are they referring to for todos?
Newbie question: Do I have to create my own api or is there a pre-existing "todo" api they are referring to?
Also curious if there are api's for other Doc examples in tanstack.
https://react-query-v3.tanstack.com/guides/mutations
I was looking in…

funtime
- 21
- 5
0
votes
0 answers
Getting Unauthenticated from react-query at POST request
I'm trying to figure out why I can't make a post request using react-query. Basically, I try to write the code below, which is working, using react-query:
//makeRequest implementation
import axios from "axios";
export const makeRequest =…

alexsmt
- 71
- 7
0
votes
1 answer
React Query - staleTime and cached value
I was trying to implement react query into one of the projects at work, but I'm struggling with understand staleTime functionality and dynamic queryKeys.
I want to fetch data for specific Producer or Category with dynamic queryKey, but if I set…

Bartosz Król
- 21
- 2
0
votes
1 answer
@tanstack/react-table npm install
I want to try basic project from tanstack/react-table from
https://github.com/TanStack/table/tree/main/examples/react/basic
I am new in NPM. I am on Windows.
I wrote:
git clone https://github.com/TanStack/table.git
then I am going to the subfolder…

Petr Barandovski
- 5
- 2
-1
votes
0 answers
How do I get my React Component to re-render?
I made a button to try and change the header based on language, but when i click it, the table wont re-render, what am I doing wrong? :/
const englishHeaderOptions = ['english'..etc]
const frenchHeaderOptions = ['french',..etc]
const…

supernewBs
- 1
- 2