0.1.0 • Published 8 years ago

@methodexists/me-grid v0.1.0

Weekly downloads
-
License
MIT
Repository
github
Last release
8 years ago

me-grid

Grid component to represent data handled by me-core.

Usage

Use <Grid /> component inside <ListProvider /> to present data from a model.

Minimal

<ListProvider
  namespace="users"
  table="users"
>
  <Grid
    routePath="/users"
    namespace="users"
    columns={[{
      keyPath: 'username',
    }, {
      keyPath: 'name',
    }]}
  />
</ListProvider>

Assumes that app state has schemas.users populated by Schemas model and lists.users populated by Lists model. <ListProvider /> does this job seamlessly.

API

<Grid /> props

PropTypeDefaultDescription
*routePathstring
*namespacestring
*columnsarray
primaryKeystring'id'
showEditbooltrue
showDeleteboolfalse
afterDeletefunc(id)undefinedWill be called after successfull delete. Deleted record id passed as a param
linkfuncundefined
sizestring'default'

columns props

PropTypeDescription
*keyPathstring
linkbool
renderfunc

Also supports Ant Design Table column props

Contributing

See CONTRIBUTING.md for how to develop a component.

0.1.0

8 years ago

0.0.8

8 years ago

0.0.7

8 years ago

0.0.6

8 years ago

0.0.5

8 years ago

0.0.4

8 years ago

0.0.3

8 years ago

0.0.2

8 years ago

0.0.1

8 years ago