@deix/rossini-postgrest
v1.2.0
Published
This repository contains react components to display and edit tables using postgrest.
Readme
Rossini Postgrest UI
This repository contains react components to display and edit tables using postgrest.
React components usage
The main component is DBTable, which can be used by passing postgrestURL and editable props:
<DBTable
postgrestURL='http://localhost:8000/api/db'
dbTable='table_name'
editable
/>Props
postgrestURL(string): base url where postgrest endpoints are reachabledbTable(string): name of the tableparams{ [key: string]: string }: any additional query params to be passed to postgresteditableboolean: will allow editing the tablesingleSelectColumns{[key: string]: string[]}: a map where the keys are table columns and the values are a list of selectable optionsnewRowTemplate: an object containing the default values for a new row
Any additional prop will be passed to the underlying DataGrid.
Usage as a docker image
docker run -d \
-e POSTGREST_URL=http://localhost:8000/ \
-e ENABLE_EDITING=true \
-p 3000:3000 \
quay.io/deix/rossini-postgrest