0.1.0 • Published 6 years ago

@methodexists/me-grid v0.1.0

Weekly downloads
-
License
MIT
Repository
github
Last release
6 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

6 years ago

0.0.8

7 years ago

0.0.7

7 years ago

0.0.6

7 years ago

0.0.5

7 years ago

0.0.4

7 years ago

0.0.3

7 years ago

0.0.2

7 years ago

0.0.1

7 years ago