Coder Social home page Coder Social logo

john-rice / grid Goto Github PK

View Code? Open in Web Editor NEW

This project forked from supabase/grid

0.0 0.0 0.0 2.96 MB

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

License: MIT License

TypeScript 90.61% JavaScript 2.08% CSS 7.31%

grid's Introduction

Deprecated

๐Ÿšจ This repo has been deprecated. ๐Ÿšจ

We've moved the grid component into the main Supabase studio repo to make it easier to work on and to help us roll out bug fixes much quicker. We have transfered all existing issues in this repo, and we continue to welcome contributors over at supabase/supabase.

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

  1. Build library: npm start
  2. Go to example folder: cd example
  3. Create .env file: cp .env.example .env
  4. Update example/.env file with your Supabase project settings
  5. 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.

grid's People

Contributors

ankitjena avatar aswathkk avatar burmecia avatar dependabot[bot] avatar dukemanh avatar harshithpabbati avatar i-pip avatar inian avatar jonthomp avatar mildtomato avatar phamhieu avatar saltcod avatar tchief avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.