@8base-react/crud
v1.7.2
Published
8base CRUD is a wrapper under the react-apollo component to simplify working with the crud operations.
Downloads
344
Readme
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
RecordCreate
Extends Component
Component for creating the record of the table
Properties
RecordCreateMany
Extends Component
Component for creating many records of the table
Properties
ChildrenPropObject
Results of the record update queries and mutation
Properties
RecordUpdate
Extends Component
Component for updating the record of the table
Properties
RecordDelete
Extends Component
Component for deleting the record of the table
Properties
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>