Skip to content

A fully-featured table component (Filter, Sorting, Column Visibility, Exporting and Layouts*) utilizing React, TypeScript and TanStack's React Table headless-library

Notifications You must be signed in to change notification settings

CowDotDev/TanStack-React-Table

Repository files navigation

Table Component

The Table component is a powerful React component, based on TanStack's @tanstack/react-table headless library, that provides advanced filtering, sorting, column visibility, and exporting functionality. It also includes support for saving filter/sorting/column layout states, although this functionality is currently disabled due to server-side dependencies. This Table component is set-up with advanced memoization to increase performance by reducing the number of unnecessary re-renders while the Context Provider modifies state. The next evolution of this table that I would like to explore is replacing the Context Provider set-up with multiple singles via Preact's Signals library.

Installation

To run the project, follow these steps:

  1. Clone the repository:
git clone https://github.com/CowDotDev/TanStack-React-Table
  1. Install the dependencies
cd TanStack-React-Table && npm i
  1. Start the application
npm start

Features

The Table component includes the following features:

  • Filtering: Users can filter the table data based on specific criteria.
  • Sorting: Users can sort the table data by one or more columns.
  • Column Visibility: Users can hide or show columns in the table.
  • Exporting: Users can export the table data in various formats (e.g., CSV, Excel).

Technical Overview

The Table component is built using React and leverages a React Context Provider for state management. It utilizes codegen hooks and types generated from a GraphQL API schema to ensure type security and provide TypeScript IntelliSense.

About

A fully-featured table component (Filter, Sorting, Column Visibility, Exporting and Layouts*) utilizing React, TypeScript and TanStack's React Table headless-library

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published