This repository contains react components to display and edit tables using postgrest.
npm install @deix/rossini-postgrestThis repository contains react components to display and edit tables using postgrest.
DBTable, which can be used by passing postgrestURL and editable props:jsx
postgrestURL='http://localhost:8000/api/db'
dbTable='table_name'
editable
/>
`Props
-
postgrestURL (string): base url where postgrest endpoints are reachable
- dbTable (string): name of the table
- params { [key: string]: string }: any additional query params to be passed to postgrest
- editable boolean: will allow editing the table
- singleSelectColumns {[key: string]: string[]}: a map where the keys are table columns and the values are a list of selectable options
- newRowTemplate: an object containing the default values for a new rowAny additional prop will be passed to the underlying DataGrid.
Usage as a docker image
`sh
docker run -d \
-e POSTGREST_URL=http://localhost:8000/ \
-e ENABLE_EDITING=true \
-p 3000:3000 \
quay.io/deix/rossini-postgrest
``