Update README.md (#32)
This commit is contained in:
parent
c95fa505dd
commit
96a9235a12
73
README.md
73
README.md
@ -10,36 +10,73 @@
|
|||||||
[](https://badge.fury.io/js/frappe-datatable)
|
[](https://badge.fury.io/js/frappe-datatable)
|
||||||
[](http://opensource.org/licenses/MIT)
|
[](http://opensource.org/licenses/MIT)
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
## Introduction
|
||||||
|
|
||||||
|
Frappe DataTable is a simple, modern and interactive datatable library for displaying tabular data. Originally built for [ERPNext](https://github.com/frappe/erpnext), it can be used to render large amount of rows without sacrificing performance and has the basic data grid features like inline editing and keyboard navigation. It does not require jQuery, like most data grids out there.
|
||||||
|
|
||||||
|
## Demo
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
## Features
|
## Features
|
||||||
|
|
||||||
* Resizable columns
|
### Cell Features
|
||||||
* Sorting
|
|
||||||
* Custom formatted data
|
* Custom Formatters
|
||||||
* In place editing
|
* Inline Editing
|
||||||
* Efficient rendering of large data
|
* Mouse Selection
|
||||||
|
* Copy Cells
|
||||||
|
* Keyboard Navigation
|
||||||
|
* Custom Cell Editor
|
||||||
|
|
||||||
|
### Column Features
|
||||||
|
|
||||||
|
* Reorder Columns
|
||||||
|
* Sort by Column
|
||||||
|
* Remove / Hide Column
|
||||||
|
* Custom Actions
|
||||||
|
* Resize Column
|
||||||
|
* Flexible Layout
|
||||||
|
|
||||||
|
### Row Features
|
||||||
|
|
||||||
|
* Row Selection
|
||||||
|
* Tree Structured Rows
|
||||||
|
* Inline Filters
|
||||||
|
* Large Number of Rows
|
||||||
|
* Dynamic Row Height
|
||||||
|
|
||||||
|
## Install
|
||||||
|
|
||||||
|
```bash
|
||||||
|
yarn add frappe-datatable
|
||||||
|
# or
|
||||||
|
npm install frappe-datatable
|
||||||
|
```
|
||||||
|
|
||||||
|
> Note: [`sortablejs`](https://github.com/RubaXa/Sortable) and [`clusterize.js`](https://github.com/NeXTs/Clusterize.js) are required to be installed as well.
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
```js
|
```js
|
||||||
var grid = new DataTable(document.querySelector('#data-table'), {
|
const datatable = new DataTable('#datatable', {
|
||||||
data: {
|
columns: [ 'First Name', 'Last Name', 'Position' ],
|
||||||
columns: [ 'Sr No.', 'First Name', 'Last Name' ],
|
data: [
|
||||||
rows: [
|
[ 'Don', 'Joe', 'Designer' ],
|
||||||
[ '1', 'Don', 'Joe' ],
|
[ 'Mary', 'Jane', 'Software Developer' ]
|
||||||
[ '2', 'Mary', 'Jane' ]
|
]
|
||||||
]
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
```
|
```
|
||||||
|
|
||||||
## Contribute
|
## Contribution
|
||||||
|
|
||||||
|
* `yarn start` - Start dev server
|
||||||
|
|
||||||
|
Now you can open the `index.html` located in the root folder, and start development. Make sure to fix all eslint errors before making a Pull Request.
|
||||||
|
|
||||||
* `yarn start` - Start rollup watch
|
|
||||||
* `yarn build` - Build js/css bundles
|
|
||||||
|
|
||||||
## License
|
## License
|
||||||
|
|
||||||
MIT
|
[MIT](http://opensource.org/licenses/MIT)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user