Relative Content

Tag Archive for javascriptreactjstypescriptnext.js

How to fetch in Server Components?

This is how I handle fetch now following the next’s document.
https://nextjs.org/docs/app/building-your-application/data-fetching/fetching-caching-and-revalidating#fetching-data-on-the-server-with-fetch

How to apply global filter on multiple input using tanstack table in reactjs?

I am using the Tanstack table in my ReactJS and Typescript application and using the Shadcn UI table to implement the table. I wanted to apply the global filter in my table using the Tanstack table on search input, category, and price input prices that come in the range. Tankstack table has onGlobalFilterChange in the useRecatTable hook which accepts a globalFilter in state which in string how to apply the global filter on these three inputs. Please help me to solve these filtering options. Below is the image of my table how does my table look also I am applying the Tanstack query to fetch that data which is below in my component all things are coming but not able to apply the global filter on the search input, category, and price range input