1.0.0 • Published 3 years ago

react-collection-manager v1.0.0

Weekly downloads
130
License
MIT
Repository
github
Last release
3 years ago

npm package NPM Downloads Code style

react-collection-manager

react-collection-manager is a manager to list, add, edit, delete documents in mongo collection automatically

This package use Simpl-schema to build automatically the create and edit forms with Uniforms thanks to material-ui version

This package is only compatible with Material-ui > 4.0

react-collection-manager in action

Demonstration and Documentation

For examples in action and full documentation, go to StoryBook

OR

To run that demo on your own computer, clone this repository and :

$ yarn install
$ yarn storybook

Getting started

Installation

Install the package

$ yarn add react-collection-manager

Install the dependencies in your project

$ yarn add @material-table/core

Usage

import React from 'react'
import ReactCollectionManager from 'react-collection-manager'
import { ThemeProvider as MuiThemeProvider } from '@material-ui/core/styles'

const entries = [
  { _id: 0, name: 'Test 1', description: 'description', status: 0 },
  { _id: 1, name: 'Test 2', description: 'description', status: 1 },
]

const columns = [
  { name: 'Name', property: 'name' },
  { name: 'Description', property: 'description' },
  { name: 'State', property: 'status', render: (data) => (data.status === 1 ? 'OK' : 'NOK') },
]

const App = () => {
  return (
    <MuiThemeProvider>
      <ReactCollectionManager
        title="Example"
        columns={columns}
        entries={entries}
        insertMethod={async (values) => {
          /* do some stuff */
        }}
        updateMethod={async (values) => {
          /* do some stuff */
        }}
        deleteMethod={async (values) => {
          /* do some stuff */
        }}
        canAdd
        canEdit
        canDelete
      />
    </MuiThemeProvider>
  )
}

Contributors

Code Contributors

This project exists thanks to all the people who contribute. [Contribute].

Financial Contributors

License

This project is licensed under the terms of the MIT license.

1.0.0

3 years ago

0.9.6

3 years ago

0.9.5

3 years ago

0.9.4

3 years ago

0.9.3

3 years ago

0.9.1

4 years ago

0.9.0

4 years ago

0.8.1

4 years ago

0.8.0

4 years ago

0.7.5

4 years ago

0.7.4

5 years ago

0.7.3

5 years ago

0.7.2

5 years ago

0.7.1

5 years ago

0.7.0

5 years ago

0.6.9

5 years ago

0.6.8

5 years ago

0.6.7

5 years ago

0.6.6

5 years ago

0.6.5

5 years ago

0.6.4

5 years ago

0.6.3

5 years ago

0.6.2

5 years ago

0.6.1

5 years ago

0.6.0

5 years ago

0.5.0

5 years ago

0.4.12

7 years ago

0.4.11

7 years ago

0.4.10

7 years ago

0.4.9

7 years ago

0.4.8

7 years ago

0.4.7

7 years ago

0.4.6

7 years ago

0.4.5

7 years ago

0.4.4

7 years ago

0.4.3

7 years ago

0.4.2

7 years ago

0.4.1

7 years ago

0.4.0

7 years ago

0.3.6

7 years ago

0.3.5

7 years ago

0.3.4

7 years ago

0.3.3

7 years ago

0.3.2

7 years ago

0.3.1

7 years ago

0.3.0

7 years ago

0.2.1

7 years ago

0.2.0

7 years ago

0.1.0

7 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