0.0.2-beta • Published 6 years ago

@vtex/react-jsonschema-table v0.0.2-beta

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

react-jsonschema-table

Simple usage react component stylesheet table with inifnite scroll for massive data consumption and line editing using JSONSchema as data structure.

Work In Progress !

NPM JavaScript Style Guide

Install

npm install --save react-modern-library-boilerplate

Simple Usage

import React, { Component } from 'react'

import Table from 'react-jsonschema-table'

class Example extends Component {
  render () {
    return (
      <Table />
    )
  }
}

API

schema: Is the JSONSchema that contains the estructure and validation rules of the rendered data.

UIschema: Schema that describe some properties for UI.

indexedFields: An array with the fieldNames that can be used to sort the table.

onSort: function that is called when a sort action is required. Receive the field that trigger the action and the direction to sort.

onGetItems: function used to load the documents on demand.

Local setup for developing

Setup project

npm i

Run example

npm run dev

License

MIT © Vtex