This package has been deprecated

Author message:

This package was moved to @8base-react/crud package. Use it instead.

@8base/crud
TypeScript icon, indicating that this package has built-in type declarations

0.37.2 • Public • Published

8base CRUD

8base CRUD is a wrapper under the react-apollo component to simplify working with the crud operations.

API

Table of Contents

RecordsList

Extends Component

Component for fetching the table content

Properties

  • tableName string Name of the table
  • tableId string Id of the table

RecordCreate

Extends Component

Component for creating the record of the table

Properties

  • tableName string Name of the table
  • tableId string Id of the table

RecordCreateMany

Extends Component

Component for creating many records of the table

Properties

  • tableName string Name of the table
  • tableId string Id of the table

ChildrenPropObject

Results of the record update queries and mutation

Properties

RecordUpdate

Extends Component

Component for updating the record of the table

Properties

  • tableName string Name of the table
  • tableId string Id of the table
  • recordId string Id of the record

RecordDelete

Extends Component

Component for deleting the record of the table

Properties

  • tableName string Name of the table
  • tableId string Id of the table
  • recordId string Id of the record

Usage

  <RecordsList
    applicationName={ applicationName }
    tableName="someTableName"
    variables={ options.variables }
  >
    { ({ data, loading }) => (<div>{data}</div>) }
  </RecordsList>     
   <RecordUpdate
    tableId="table-id"
    recordId="42"
    onCompleted={ () => {
      ...
    } }
  >
    { (onSubmit, { tableMetaResult, recordDataResult, fetchingLoading }) => (
      <FormComponent initialValues={ recordDataResult.data } onSubmit={ onSubmit } />
    ) }
  </RecordUpdate>

Readme

Keywords

none

Package Sidebar

Install

npm i @8base/crud

Weekly Downloads

2

Version

0.37.2

License

MIT

Unpacked Size

48.4 kB

Total Files

39

Last publish

Collaborators

  • dav1nx1
  • jorge.osorio
  • 8base-bot