You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

@supabase/grid

Package Overview
Dependencies
Maintainers
5
Versions
111
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@supabase/grid

A react component to display your Postgres table data. Used in Supabase Dashboard app.

2.6.0
latest
npmnpm
Version published
Weekly downloads
0
Maintainers
5
Weekly downloads
 
Created
Source

Supabase Grid

A react component to display your Postgresql table data.

release CI

Install

npm i @supabase/grid

This package requires some peer dependencies, which you need to install by yourself.

npm i react react-dom @supabase/react-data-grid @supabase/ui

Usage

<SupabaseGrid
  table="countries"
  onSqlQuery={async (query: string) => {
    // run query and return the result
  }}
/>

Properties

Required

  • table SupaTable object or table/view name.
    • readonly mode: support both table and view
    • editable mode: only for table
  • onSqlQuery run sql query.

Optional

  • editable enable table editor.
  • headerActions react node to display in grid header.
  • gridProps props to config grid view.
  • schema table/view schema. Defaults to 'public'.
  • storageRef storageRef is used to save state on localstorage.
  • theme grid theme.
  • onAddColumn show create new column button if available.
  • onAddRow show add row button if available.
  • onError error handler.
  • onEditColumn show edit column menu if available.
  • onEditRow show edit row button if available.
  • onDeleteColumn show delete column menu if available.

Run example

  • Build library: npm start
  • Go to example folder: cd example
  • Create .env file: cp .env.example .env
  • Update example/.env file with your Supabase project settings
  • Run example app: npm start

Contributing

  • Fork the repo on GitHub
  • Clone the project to your own machine
  • Commit changes to your own branch
  • Push your work back up to your fork
  • Submit a Pull request so that we can review your changes and merge

License

This repo is licensed under MIT.

FAQs

Package last updated on 20 Apr 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts