🚨 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.
A react component to display your Postgresql table data.
npm i @supabase/gridThis package requires some peer dependencies, which you need to install by yourself.
npm i react react-dom @supabase/react-data-grid @supabase/ui<SupabaseGrid
table="countries"
onSqlQuery={async (query: string) => {
// run query and return the result
}}
/>tableSupaTable object or table/view name.- readonly mode: support both table and view
- editable mode: only for table
onSqlQueryrun sql query.
editableenable table editor.headerActionsreact node to display in grid header.gridPropsprops to config grid view.schematable/view schema. Defaults to 'public'.storageRefstorageRef is used to save state on localstorage.themegrid theme.onAddColumnshow create new column button if available.onAddRowshow add row button if available.onErrorerror handler.onEditColumnshow edit column menu if available.onEditRowshow edit row button if available.onDeleteColumnshow delete column menu if available.
- 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
- 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
This repo is licensed under MIT.