5.2.3 • Published 12 months ago

teams-glide-data-grid-cells v5.2.3

Weekly downloads
-
License
MIT
Repository
-
Last release
12 months ago

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;
}, []);