Questions tagged [tanstack]

74 questions
0
votes
0 answers

Enzyme: Dragging a Div

I am using enzyme to test @tanstack/react-table I want to test that when the resizer div is moved, the width of the column should be updated. const draggableDiv = this.wrapper.find("table thead th .resizer").at(index); const divNode…
0
votes
0 answers

Tanstack table headerprops not accessible anymore

I am currently working with tanstack table and material-ui and I am currently working on a custom filter where when the user clicks the header for a table a popover will appear, right now I am trying to anchor the popover to the I've…
0
votes
1 answer

@tanstack/react-table v8: How to get next row when sorted

I have a sorted(!) @tanstack-table v8 (aka react-table). In each tr there is an onClick-Handler which gives me access to the current row-object. So far so good. But how do I get access to the next (or previous) row? Sadly row.index isn't working as…
Teckstudio
  • 16
  • 1
  • 2
0
votes
1 answer

How to debounce/throttle this object prop method?

I'm using this javascript code for @tanstack/query IndexedDB persistance as documented here. I'm having too much put() calls and I would like to throttle/debounce them. How can I do this in the below code? function createIDBPersister(store:…
Fred Hors
  • 3,258
  • 3
  • 25
  • 71
0
votes
0 answers

Define Custom Type for Tanstack Table FilterFuntion

I wrote a custom filter function for Tanstack Table which makes use of fuse.js. However, typesript complains about all of my attempts to define the type of my custom function. I want my Function to comply with this type definition export interface…
szk
  • 11
  • 1
0
votes
0 answers

Next.js 13 API Route Returns 500 Error When Saving Image - Prisma and zod Validation

I'm working on a Next.js application where users can generate logos and save them to their account. When the user clicks the "Save Image" button, a POST request is made to an API route to save the image URL along with the user ID to a Prisma…
0
votes
1 answer

React query is not fetching data

I am using react query to fetch data from API. I want to fetch a single product data, and render a component with its data. The problem is that the react query ist working at all. Help me please. This is the react query ...what is wrong here can…
0
votes
2 answers

Tanstack Table & React JS: How to Show/Hide Button depend on Status when using React JS and Tanstack Table

I have react js and implement tanstack table(react-table). I need help to make button/link show or hide depended on the status in each row. Let say if there is row contain status 'Approve' the button will show, then if not it will hidden. ......some…
0
votes
0 answers

Mantine React Table: RowSpan not positioning merged column correctly, causing misalignment

I am encountering an issue while using rowSpan in Mantine React Table. I have applied rowSpan to a specific column to merge cells, and the merging itself works as expected. However, the problem arises when the rowSpan causes the merged column to be…
Akashaf
  • 1
  • 2
0
votes
0 answers

React Query performance issue

I am using React Query in my React app, when I using enabled option to tell a query when it is ready to run, it is still persists to the cache as disabled even if this query not execute. I wonder if these disabled caches are causing cache resource…
Epple
  • 640
  • 14
0
votes
1 answer

How to render jsx in tanstack table column

I am using tanstack react-table library. How can I render a jsx element in the table column. I was trying to use the accessorFn to return jsx but I get an object in the browser. interface RetailPriceTableColumnDef { commodity: string; …
user12504353
  • 179
  • 3
  • 13
0
votes
0 answers

How to set multiple table columns first and then apply filters in TanStack Table using Reactjs

Hi I am using React Table that is TanStack Table for the topic listing using React Js. I have searched for it and I find 2 ways of filtering Global search, where you have single field to search all over table Column level filtering, where every…
0
votes
1 answer

Nested/conditional chained API calls in React Query?

We need a function that may call an API or the other, and based on the result, call yet another API. Let me give a simplified example. We're trying to do something like this function getCarDetails(car: CarSummary): UseQueryResult { …
Aximili
  • 28,626
  • 56
  • 157
  • 216
0
votes
1 answer

How to wrap tanstack/router Link with another component while keeping type safety

I would like to wrap the Link component from Tanstack Router with another component and be able to pass this component the props that are needed to be passed to the Link component. I.e. I want to make a reusable that uses wraps an external button…
Sjiep
  • 688
  • 5
  • 14
0
votes
1 answer

React Tanstack useQuery showing 'pause' status on every query

All of mine queries showing the 'paused' status. Even though the 'enable' flag is true. Here is the screen of how devtools look like and the hook that calling the query import { useQuery } from "@tanstack/react-query"; const getWordInfo = async…