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

@paprika/data-grid

v4.0.1

Published

DataGrid is a wrapper of react-window

Downloads

2,781

Readme

@paprika/data-grid

Description

DataGrid is a wrapper of react-window

Installation

yarn add @paprika/data-grid

or with npm:

npm install @paprika/data-grid

Props

DataGrid

| Prop | Type | required | default | Description | | ----------------------------- | --------------------------------------------------------------------------------------------------------------------------- | -------- | -------------------------- | -------------------------------------------------------------------------------------------- | | autofocus | bool | false | true | If the data cell should automatically get focus | | borderType | [ DataGrid.types.border.GRID, DataGrid.types.border.NONE, DataGrid.types.border.HORIZONTAL, DataGrid.types.border.VERTICAL] | false | DataGrid.types.border.GRID | Define the look for borders in the table types.DataGrid.GRID, types.DataGrid.NONE, etc. | | children | node | true | - | | | forceTableWidthWithScrollBars | bool | false | false | This will force the table to include in the calculation of the table the scrollbar thickness | | hasZebraStripes | bool | false | false | Add an alternate background on the DataGrid's rows | | data | arrayOf | false | [] | Array of data to be stored in the DataGrid | | height | number | false | 600 | Sets the height of the DataGrid | | onClick | func | false | null | Callback onClick | | onKeyDown | func | false | () => {} | Callback onKeyDown press | | onPressEnter | func | false | null | Callback when Enter key is pressed | | onPressShiftSpaceBar | func | false | null | Callback when Shift + Spacebar is pressed | | onPressSpaceBar | func | false | null | Callback when Spacebar is pressed | | onRowChecked | func | false | () => {} | Callback when user click the f key. Might change in the future | | onHighlighted | func | false | () => {} | Callback with information about the prev and next highlighted cell | | rowHeight | number | false | 36 | Sets the row height | | width | number | false | null | Sets the DataGrid width |

DataGrid.ColumnDefinition

| Prop | Type | required | default | Description | | -------------------- | ------ | -------- | -------- | ----------- | | canGrow | bool | false | false | | | cell | custom | false | - | | | cellA11yText | func | false | null | | | cellProps | func | false | null | | | cellPropsResetCSS | bool | false | false | | | header | custom | false | - | | | headerA11yText | func | false | null | | | headerProps | func | false | null | | | isSticky | bool | false | false | | | onClick | func | false | () => {} | | | onPressEnter | func | false | null | | | onPressShiftSpaceBar | func | false | null | | | onPressSpaceBar | func | false | null | | | width | number | false | 182 | |

DataGrid.InfiniteScroll

| Prop | Type | required | default | Description | | --------------- | ------ | -------- | -------- | ----------- | | rowsOffset | number | false | 25 | | | onReachedOffset | func | false | () => {} | |

Usage

For a basic DataGrid

import DataGrid from "@paprika/data-grid";

const data = [{ column1: "1", column2: "2" }, { column1: "3", column2: "4" }, { column1: "5", column2: "6" }];

return (
  <DataGrid>
    <DataGrid.ColumnDefinition header="Column 1" cell="column1" />
    <DataGrid.ColumnDefinition header="Column 2" cell="column2" />
  </DataGrid>
);

Documentation Need to update link for documentation More detail about these props

Links