JSPM

@glideapps/glide-data-grid-cells

4.0.3-beta1
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 14798
  • Score
    100M100P100Q167885F
  • License MIT

Extra cells for glide-data-grid

Package Exports

  • @glideapps/glide-data-grid-cells

Readme


Glide Data Grid Cells

Additional cells and features for Glide Data Grid

Version React 16+ npm bundle size License Made By Glide

Data Grid

Current cells

  • Star (Rating) Cell
  • Sparklines
  • Article
  • Dropdown
  • Range
  • User profile
  • Tags

Usage

Step 1: Add the extra cells to your grid.

import { useExtraCells } from "@glideapps/glide-data-grid-cells";

const Grid = () => {
  const { drawCell, provideEditor } = useExtraCells();
  
  return <DataEditor {...rest} drawCell={drawCell} provideEditor={provideEditor} />
}

Step 2: Use the cells in your getCellContent callback

import type { StarCell } from "@glideapps/glide-data-grid-cells";

const getCellContent = React.useCallback(() => {
  const starCell: StarCell = {
      kind: GridCellKind.Custom,
      allowOverlay: true,
      copyData: "4 out of 5",
      data: {
          kind: "star-cell",
          label: "Test",
          rating: 4,
      },
  };

  return starCell;
}, []);