@8base-react/crud 中文文档教程
8base CRUD
8base CRUD 是 react-apollo 组件下的包装器,用于简化 crud 操作的工作。
API
Table of Contents
RecordsList
Extends Component
获取表格内容的
Properties
RecordCreate
组件 Extends Component
创建表格记录的
Properties
RecordCreateMany
组件 Extends Component
创建表格多条记录的组件
Properties
ChildrenPropObject
Results记录更新查询和变异
Properties
RecordUpdate
Extends Component
更新表记录的
Properties
RecordDelete
组件 Extends Component
删除表记录的组件
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>
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>
更多
你可能也喜欢
- 90crew-node-browser-history 中文文档教程
- @168-cli/cli 中文文档教程
- @1msoft/kant-ui 中文文档教程
- @24hr/react-hooks 中文文档教程
- @36node/shanghaibus-messenger 中文文档教程
- @3m1/service-worker-updater 中文文档教程
- @42shadow42/react-editable-title 中文文档教程
- @4players/odin 中文文档教程
- @540deg/react-native-simple-markdown 中文文档教程
- @9gustin/storify-react 中文文档教程