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

taula

v0.4.0

Published

A table that will scroll forever, if you give it enough data.

Downloads

2

Readme

Taula

Taula

Build Status npm version

"Infinite" or "Indefinite" scrolling in a react-based CardTable.

The name Taula comes from the Catalan word for Table.

Usage

To use Taula in your code, you can simply do:

const InfiniteTable = require('Taula');

Then, use it like a regular React component.

Props

All properties are optional unless specified otherwise.

  • columnCount (required)
    • the number of columns that are present
  • data (required)
    • contains the data that will be rendered into the table
    • all values are passed through to the customRowComponent, if used
    • Structure:
      • item (object or array)
        • an unstructured place to store the data for a row
        • If you don't provide a customRowComponent, it should be an Array
      • className
        • a className given to the row if customRowComponent isn't used
      • colSpanOverride
        • set as the colspan attribute of each <td>
        • useful if you want, for example, a cell to take up the full row
      • otherProps
        • a dumping ground for other row-implementation-specific properties
      • getMoreRowClasses
        • a function that is used to dynamically calculate styles to apply to the row
        • parameters
          • base: the className passed in in the className property (useful if you have a generic row class)
          • item: the item in the item property (useful for styling based on the data, ex. an overdue style)
          • index: the index of the row in the table as a whole (useful for odd/even striping)
  • chunkSize (required)
    • minimum number of pieces of data to load at a time
    • Taula should accomodate small chunks, but bigger chunks means better performance on the client
  • customRowComponent
    • a React component that will be rendered for each piece of data passed in
    • must return a <tr> as its top level node
  • headerElement
    • a React element that will be used as the table's <thead>
    • should have already been created using React.createElement
    • top level node must be a <thead>
  • columnMetadata (array of objects)
    • useful for providing information about the columns to a customRowComponent
    • for example, could contain formatting info about the cells in each column
  • loading
    • should be set to true while the parent is loading additional (or initial) data
    • when true, a loading message will be shown at the bottom of the table
  • loadingMessage (node)
    • displayed at the bottom of the table when props.loading is true
  • noDataMessage
    • displayed at the bottom of the table if no data has been passed in but the table is no longer loading
  • loadData
    • a function that is used to request more data
    • it accepts a single parameter, bottomIndex
      • bottomIndex indicates that Taula needs the data from [0, bottomIndex)
  • tableClassName
    • a className that is added to the top level component (currently a <table>)