Giter VIP home page Giter VIP logo

nativedatagrid's Introduction

Native Data Grid

A DataGrid with Native components. The idea was to create a data grid that only use native components.

How to install:

git clone https://github.com/farebord/nativedatagrid
cd nativedatagrid
npm i
npm start

How to tests / see coverage

npm test
npm run coverage
To do:
  • Add missing tests (actions, reducer and Example component) to reach 100% coverage.
  • Finish renderEdit prop in order to catch save or cancel when keyDown or other events
  • ...

DataGrid

Prop Type Required Information
columns array yes Columns that will be rendered
data arrayOf({id: Required}) no Data to display. Id is required in every row
loading boolean no Display a loading message
loadingMessage string no Text shown when loading is set as true
noDataMessage string no Text shown when there is no data
editable boolean no Enables cell edit
selectable boolean no Adds a column with checkbox to select rows
Events Type Required Information
onSelectedChange func no Returns an array with selected rows id
onCellChange func yes Returns the object with the column changed
onCellCancel func yes Returns the row and the value that was canceled as second argument

Cell

Prop Type Required Information
value any no The value to be displayed
type string no Value type. For eg: img renders and img tag
editable boolean yes Forces cell to be editable
renderValue func no Function that returns how to render the value
renderEdit func no Function that returns how to edit the value
Events Type Required Information
onCancel func yes Returns the value canceled when Escape is pressed
onChange func yes Returns the value changed when input is blur

nativedatagrid's People

Contributors

farebord avatar

Stargazers

 avatar

Watchers

 avatar James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.