npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

listing-rez-test-1

v1.0.11

Published

A table component built on TanStack Table

Downloads

552

Readme

📦 Installation

To use listing-rez-test-1, install it along with its peer dependencies:

npm install listing-rez-test-1 @tanstack/react-table

Craft Table

listing-rez-test-1 is a highly customizable React table component built on top of TanStack Table. It provides powerful table functionality with features for server-side processing, column management, and additional UI enhancements.

We highly recommend providing a max-height in your CSS for the class ts__table__wrapper, tailored to your requirements, to ensure the best experience.

🚀 Features

listing-rez-test-1 supports a wide range of features out of the box:

Core Features

  • Striped layout
  • Compact mode
  • Custom Nested Component.
  • In-built default loader as well as custom loader option.
  • Custom hook that provides all the states of table, for e.g. pagination page size (useCraftTable).
  • Fullscreen mode to focus only on Table contents.
  • Word break all for table content.
  • Column content alignment.

TanStack Table Features

  • Sorting
  • Server Side Sorting
  • Pagination
  • Server Side Pagination
  • Column Reordering (Drag and Drop)
  • Column Sizing
  • Column Resizing
  • Column Pinning
  • Row Selection
  • Toggle column on and off (required Topbar)

🛠 Usage

Here’s an example of how to use listing-rez-test-1:

import TableWrapper from 'listing-rez-test-1';

const newData = [
  { id: 1, name: 'John Doe', age: 28 },
  { id: 2, name: 'Jane Doe', age: 34 },
  ];

const defaultColumns = [
  { accessorKey: 'id', header: 'ID' },
  { accessorKey: 'name', header: 'Name' },
  { accessorKey: 'age', header: 'Age' },
  ];

export default function App() {
  return (
    <TableWrapper
      data={newData}
      columns={defaultColumns}
      featureOptions={{
        striped: true,
        enableColumnReordering: true,
        enableColumnPinning: true,
      }}
      loadingOptions={{
        isLoading: false,
        loaderText: "Loading...",
      }}
    />
  );
}

🔧 API Reference

CraftTable

Props

| Prop | Type | Description | | ---------------- | ---------------------- | -------------------------------------------------------------------------------- | | data | Array | The data to be displayed in the table. | | columns | Array | Column definitions, compatible with TanStack Table. | | featureOptions | CraftTableFeatureProps | Object containing feature flags for enabling/disabling specific functionalities. | | loadingOptions | LoadingOptions | Object for controlling loading behavior. |


CraftTableFeatureProps

| Feature | Type | Default | Description | | ---------------------------- | ------- | ------- | ---------------------------------------------------------- | | enableSorting | boolean | true | Enables client-side sorting. | | enableServerSideSorting | boolean | false | Enables server-side sorting. | | enableServerSidePagination | boolean | false | Enables server-side pagination. | | enableRowSelection | boolean | true | Enables row selection functionality. | | enableColumnResizing | boolean | true | Allows columns to be resized by dragging. | | enableColumnReordering | boolean | false | Allows columns to be reordered via drag-and-drop. | | enableColumnPinning | boolean | false | Enables pinning columns to the left or right of the table. | | enableTopbar | boolean | true | Enables a custom topbar for the table. | | enableWordBreakAll | boolean | false | Applies word-break: break-all to prevent text overflow. | | stickyHeader | boolean | true | Makes the table header sticky when scrolling vertically. | | compactTable | boolean | false | Reduces row height for a compact layout. | | striped | boolean | false | Adds striped row styling for better readability. |


LoadingOptions

| Option | Type | Default | Description | | ------------------ | --------- | ------------ | ---------------------------------------- | | isLoading | boolean | false | Whether the table is in a loading state. | | loaderText | string | "Loading..." | Text to display when loading. | | loadingComponent | ReactNode | undefined | Custom loading component to render. |

📘 Documentation

For detailed documentation and examples, visit the TanStack Table Docs.